<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   用朴素贝叶斯进行文本分类(下)  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/24536.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466454692: Accept with keywords: (title(0.5):社区,文本,数盟,分类, topn(0.4):概率,蜜罐,数盟,学派,垃圾邮件,数据挖掘,阈值,标签,模型,关键词,电影,拼写错误,计算,文章,方法,这三类,函数,权重,词语,公式,样本,问题,篇幅,形容词,发票,分词,分类,先验概率,文本,邮件).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    用朴素贝叶斯进行文本分类(下)
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    用朴素贝叶斯进行文本分类(下) | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,62] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech/analysis">
       数据分析
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/24536.html">
          用朴素贝叶斯进行文本分类(下)
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          467 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech/analysis" rel="category tag">
          数据分析
         </a>
         ,
         <a href="http://dataunion.org/category/tech/dm" rel="category tag">
          数据挖掘
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <p>
        作者：
        <a href="http://blog.csdn.net/longxinchen_ml?viewmode=contents">
         龙心尘
        </a>
        &amp;&amp;
        <a href="http://blog.csdn.net/han_xiaoyang?viewmode=contents">
         寒小阳
        </a>
        <br/>
        时间：2016年2月。
        <br/>
        出处：
        <br/>
        <a href="http://blog.csdn.net/longxinchen_ml/article/details/50629110">
         http://blog.csdn.net/longxinchen_ml/article/details/50629110
        </a>
        <br/>
        <a href="http://blog.csdn.net/han_xiaoyang/article/details/50629587">
         http://blog.csdn.net/han_xiaoyang/article/details/50629587
        </a>
        <br/>
        声明：版权所有，转载请联系作者并注明出处
       </p>
       <h2 id="1-引言">
        <p name="t0">
        </p>
        1. 引言
       </h2>
       <p>
        上一篇文章我们主要从理论上梳理了朴素贝叶斯方法进行文本分类的基本思路。这篇文章我们主要从实践上探讨一些应用过程中的tricks，并进一步分析贝叶斯方法，最后以情绪褒贬分析和拼写纠错为例展示这种简单强大的方法在自然语言处理问题上的具体应用。
       </p>
       <h2 id="2-为什么不直接匹配关键词来识别垃圾邮件">
        <p name="t1">
        </p>
        2. 为什么不直接匹配关键词来识别垃圾邮件？
       </h2>
       <p>
        看了上一篇文章的一些同学可能会问：“何必费这么大劲算那么多词的概率？直接看邮件中有没有‘代开发票’、‘转售发票’之类的关键词不就得了？如果关键词比较多就认为是垃圾邮件呗。”
       </p>
       <p>
        咳咳，其实关键词匹配的方法如果有效的话真不必用朴素贝叶斯。毕竟这种方法简单嘛，
        <strong>
         就是一个字符串匹配
        </strong>
        。从历史来看，之前没有贝叶斯方法的时候主要也是用关键词匹配。
        <strong>
         但是这种方法准确率太低
        </strong>
        。我们在工作项目中也尝试过用关键词匹配的方法去进行文本分类，发现大量误报。感觉就像扔到垃圾箱的邮件99%都是正常的！这样的效果不忍直视。而加一个朴素贝叶斯方法就可能把误报率拉低近一个数量级，体验好得不要不要的。
       </p>
       <p>
        <strong>
         另一个原因是词语会随着时间不断变化
        </strong>
        。发垃圾邮件的人也不傻，当他们发现自己的邮件被大量屏蔽之后，也会考虑采用新的方式，
        <strong>
         如变换文字、词语、句式、颜色等方式来绕过反垃圾邮件系统
        </strong>
        。比如对于垃圾邮件“我司可办理正规发票，17%增值税发票点数优惠”,他们采用火星文：
        <strong>
         “涐司岢办理㊣規髮票，17%增値稅髮票嚸數優蕙”
        </strong>
        ，那么字符串匹配的方法又要重新找出这些火星文，一个一个找出关键词，重新写一些匹配规则。更可怕的是，这些规则可能相互之间的耦合关系异常复杂，要把它们梳理清楚又是大一个数量级的工作量。等这些规则失效了又要手动更新新的规则……
        <strong>
         无穷无尽猫鼠游戏最终会把猫给累死
        </strong>
        。
       </p>
       <p>
        而朴素贝叶斯方法却显示出无比的优势。因为它是
        <strong>
         基于统计方法
        </strong>
        的，只要训练样本中有更新的垃圾邮件的新词语，哪怕它们是火星文，
        <strong>
         都能自动地把哪些更敏感的词语（如“髮”、“㊣”等）给凸显出来，并根据统计意义上的敏感性给他们分配适当的权重
        </strong>
        ，这样就不需要什么人工了，非常省事。
        <strong>
         你只需要时不时地拿一些最新的样本扔到训练集中，重新训练一次即可
        </strong>
        。
       </p>
       <p>
        小补充一下，对于火星文、同音字等替代语言，一般的分词技术可能会分得不准，最终可能只把一个一个字给分出来，成为“分字”。效果可能不会太好。也可以用过n-gram之类的语言模型(后续博客马上提到，尽请关注)，拿到最常见短语。当然，对于英文等天生自带空格来间隔单词的语言，分词则不是什么问题，使用朴素贝叶斯方法将会更加顺畅。
       </p>
       <h2 id="3工程上的一些tricks">
        <p name="t2">
        </p>
        3.工程上的一些tricks
       </h2>
       <p>
        应用朴素贝叶斯方法的过程中，一些tricks能显著帮助工程解决问题。我们毕竟经验有限，无法将它们全都罗列出来，只能就所知的一点点经验与大家分享，欢迎批评指正。
       </p>
       <h3 id="31-trick1取对数">
        <p name="t3">
        </p>
        3.1 trick1：取对数
       </h3>
       <p>
        我们上一篇文章用来识别垃圾邮件的方法是比较以下两个概率的大小（字母S表示“垃圾邮件”,字母H表示“正常邮件”）：
       </p>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-1-Frame">
          <span class="math" id="MathJax-Span-1">
           <span class="mrow" id="MathJax-Span-2">
            <span class="mi" id="MathJax-Span-3">
             C
            </span>
            <span class="mo" id="MathJax-Span-4">
             =
            </span>
            <span class="mi" id="MathJax-Span-5">
             P
            </span>
            <span class="mo" id="MathJax-Span-6">
             (
            </span>
            <span class="mo" id="MathJax-Span-7">
             “
            </span>
            <span class="texatom" id="MathJax-Span-8">
             <span class="mrow" id="MathJax-Span-9">
              <span class="mo" id="MathJax-Span-10">
               我
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-11">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-12">
             <span class="mrow" id="MathJax-Span-13">
              <span class="mo" id="MathJax-Span-14">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-15">
             S
            </span>
            <span class="mo" id="MathJax-Span-16">
             )
            </span>
            <span class="mi" id="MathJax-Span-17">
             P
            </span>
            <span class="mo" id="MathJax-Span-18">
             (
            </span>
            <span class="mo" id="MathJax-Span-19">
             “
            </span>
            <span class="texatom" id="MathJax-Span-20">
             <span class="mrow" id="MathJax-Span-21">
              <span class="mo" id="MathJax-Span-22">
               司
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-23">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-24">
             <span class="mrow" id="MathJax-Span-25">
              <span class="mo" id="MathJax-Span-26">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-27">
             S
            </span>
            <span class="mo" id="MathJax-Span-28">
             )
            </span>
            <span class="mi" id="MathJax-Span-29">
             P
            </span>
            <span class="mo" id="MathJax-Span-30">
             (
            </span>
            <span class="mo" id="MathJax-Span-31">
             “
            </span>
            <span class="texatom" id="MathJax-Span-32">
             <span class="mrow" id="MathJax-Span-33">
              <span class="mo" id="MathJax-Span-34">
               可
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-35">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-36">
             <span class="mrow" id="MathJax-Span-37">
              <span class="mo" id="MathJax-Span-38">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-39">
             S
            </span>
            <span class="mo" id="MathJax-Span-40">
             )
            </span>
            <span class="mi" id="MathJax-Span-41">
             P
            </span>
            <span class="mo" id="MathJax-Span-42">
             (
            </span>
            <span class="mo" id="MathJax-Span-43">
             “
            </span>
            <span class="texatom" id="MathJax-Span-44">
             <span class="mrow" id="MathJax-Span-45">
              <span class="mo" id="MathJax-Span-46">
               办
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-47">
             <span class="mrow" id="MathJax-Span-48">
              <span class="mo" id="MathJax-Span-49">
               理
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-50">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-51">
             <span class="mrow" id="MathJax-Span-52">
              <span class="mo" id="MathJax-Span-53">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-54">
             S
            </span>
            <span class="mo" id="MathJax-Span-55">
             )
            </span>
            <span class="mi" id="MathJax-Span-56">
             P
            </span>
            <span class="mo" id="MathJax-Span-57">
             (
            </span>
            <span class="mo" id="MathJax-Span-58">
             “
            </span>
            <span class="texatom" id="MathJax-Span-59">
             <span class="mrow" id="MathJax-Span-60">
              <span class="mo" id="MathJax-Span-61">
               正
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-62">
             <span class="mrow" id="MathJax-Span-63">
              <span class="mo" id="MathJax-Span-64">
               规
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-65">
             <span class="mrow" id="MathJax-Span-66">
              <span class="mo" id="MathJax-Span-67">
               发
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-68">
             <span class="mrow" id="MathJax-Span-69">
              <span class="mo" id="MathJax-Span-70">
               票
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-71">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-72">
             <span class="mrow" id="MathJax-Span-73">
              <span class="mo" id="MathJax-Span-74">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-75">
             S
            </span>
            <span class="mo" id="MathJax-Span-76">
             )
            </span>
           </span>
          </span>
         </span>
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-2-Frame">
          <span class="math" id="MathJax-Span-77">
           <span class="mrow" id="MathJax-Span-78">
            <span class="mo" id="MathJax-Span-79">
             ×
            </span>
            <span class="mi" id="MathJax-Span-80">
             P
            </span>
            <span class="mo" id="MathJax-Span-81">
             (
            </span>
            <span class="mo" id="MathJax-Span-82">
             “
            </span>
            <span class="texatom" id="MathJax-Span-83">
             <span class="mrow" id="MathJax-Span-84">
              <span class="mo" id="MathJax-Span-85">
               保
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-86">
             <span class="mrow" id="MathJax-Span-87">
              <span class="mo" id="MathJax-Span-88">
               真
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-89">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-90">
             <span class="mrow" id="MathJax-Span-91">
              <span class="mo" id="MathJax-Span-92">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-93">
             S
            </span>
            <span class="mo" id="MathJax-Span-94">
             )
            </span>
            <span class="mi" id="MathJax-Span-95">
             P
            </span>
            <span class="mo" id="MathJax-Span-96">
             (
            </span>
            <span class="mo" id="MathJax-Span-97">
             “
            </span>
            <span class="texatom" id="MathJax-Span-98">
             <span class="mrow" id="MathJax-Span-99">
              <span class="mo" id="MathJax-Span-100">
               增
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-101">
             <span class="mrow" id="MathJax-Span-102">
              <span class="mo" id="MathJax-Span-103">
               值
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-104">
             <span class="mrow" id="MathJax-Span-105">
              <span class="mo" id="MathJax-Span-106">
               税
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-107">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-108">
             <span class="mrow" id="MathJax-Span-109">
              <span class="mo" id="MathJax-Span-110">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-111">
             S
            </span>
            <span class="mo" id="MathJax-Span-112">
             )
            </span>
            <span class="mi" id="MathJax-Span-113">
             P
            </span>
            <span class="mo" id="MathJax-Span-114">
             (
            </span>
            <span class="mo" id="MathJax-Span-115">
             “
            </span>
            <span class="texatom" id="MathJax-Span-116">
             <span class="mrow" id="MathJax-Span-117">
              <span class="mo" id="MathJax-Span-118">
               发
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-119">
             <span class="mrow" id="MathJax-Span-120">
              <span class="mo" id="MathJax-Span-121">
               票
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-122">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-123">
             <span class="mrow" id="MathJax-Span-124">
              <span class="mo" id="MathJax-Span-125">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-126">
             S
            </span>
            <span class="mo" id="MathJax-Span-127">
             )
            </span>
            <span class="mi" id="MathJax-Span-128">
             P
            </span>
            <span class="mo" id="MathJax-Span-129">
             (
            </span>
            <span class="mo" id="MathJax-Span-130">
             “
            </span>
            <span class="texatom" id="MathJax-Span-131">
             <span class="mrow" id="MathJax-Span-132">
              <span class="mo" id="MathJax-Span-133">
               点
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-134">
             <span class="mrow" id="MathJax-Span-135">
              <span class="mo" id="MathJax-Span-136">
               数
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-137">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-138">
             <span class="mrow" id="MathJax-Span-139">
              <span class="mo" id="MathJax-Span-140">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-141">
             S
            </span>
            <span class="mo" id="MathJax-Span-142">
             )
            </span>
            <span class="mi" id="MathJax-Span-143">
             P
            </span>
            <span class="mo" id="MathJax-Span-144">
             (
            </span>
            <span class="mo" id="MathJax-Span-145">
             “
            </span>
            <span class="texatom" id="MathJax-Span-146">
             <span class="mrow" id="MathJax-Span-147">
              <span class="mo" id="MathJax-Span-148">
               优
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-149">
             <span class="mrow" id="MathJax-Span-150">
              <span class="mo" id="MathJax-Span-151">
               惠
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-152">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-153">
             <span class="mrow" id="MathJax-Span-154">
              <span class="mo" id="MathJax-Span-155">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-156">
             S
            </span>
            <span class="mo" id="MathJax-Span-157">
             )
            </span>
            <span class="mi" id="MathJax-Span-158">
             P
            </span>
            <span class="mo" id="MathJax-Span-159">
             (
            </span>
            <span class="mo" id="MathJax-Span-160">
             “
            </span>
            <span class="texatom" id="MathJax-Span-161">
             <span class="mrow" id="MathJax-Span-162">
              <span class="mo" id="MathJax-Span-163">
               垃
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-164">
             <span class="mrow" id="MathJax-Span-165">
              <span class="mo" id="MathJax-Span-166">
               圾
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-167">
             <span class="mrow" id="MathJax-Span-168">
              <span class="mo" id="MathJax-Span-169">
               邮
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-170">
             <span class="mrow" id="MathJax-Span-171">
              <span class="mo" id="MathJax-Span-172">
               件
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-173">
             ”
            </span>
            <span class="mo" id="MathJax-Span-174">
             )
            </span>
           </span>
          </span>
         </span>
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-3-Frame">
          <span class="math" id="MathJax-Span-175">
           <span class="mrow" id="MathJax-Span-176">
            <span class="munderover" id="MathJax-Span-177">
             <span class="mi" id="MathJax-Span-178">
              C
             </span>
             <span class="mo" id="MathJax-Span-179">
              ¯¯¯
             </span>
            </span>
            <span class="mo" id="MathJax-Span-180">
             =
            </span>
            <span class="mi" id="MathJax-Span-181">
             P
            </span>
            <span class="mo" id="MathJax-Span-182">
             (
            </span>
            <span class="mo" id="MathJax-Span-183">
             “
            </span>
            <span class="texatom" id="MathJax-Span-184">
             <span class="mrow" id="MathJax-Span-185">
              <span class="mo" id="MathJax-Span-186">
               我
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-187">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-188">
             <span class="mrow" id="MathJax-Span-189">
              <span class="mo" id="MathJax-Span-190">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-191">
             H
            </span>
            <span class="mo" id="MathJax-Span-192">
             )
            </span>
            <span class="mi" id="MathJax-Span-193">
             P
            </span>
            <span class="mo" id="MathJax-Span-194">
             (
            </span>
            <span class="mo" id="MathJax-Span-195">
             “
            </span>
            <span class="texatom" id="MathJax-Span-196">
             <span class="mrow" id="MathJax-Span-197">
              <span class="mo" id="MathJax-Span-198">
               司
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-199">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-200">
             <span class="mrow" id="MathJax-Span-201">
              <span class="mo" id="MathJax-Span-202">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-203">
             H
            </span>
            <span class="mo" id="MathJax-Span-204">
             )
            </span>
            <span class="mi" id="MathJax-Span-205">
             P
            </span>
            <span class="mo" id="MathJax-Span-206">
             (
            </span>
            <span class="mo" id="MathJax-Span-207">
             “
            </span>
            <span class="texatom" id="MathJax-Span-208">
             <span class="mrow" id="MathJax-Span-209">
              <span class="mo" id="MathJax-Span-210">
               可
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-211">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-212">
             <span class="mrow" id="MathJax-Span-213">
              <span class="mo" id="MathJax-Span-214">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-215">
             H
            </span>
            <span class="mo" id="MathJax-Span-216">
             )
            </span>
            <span class="mi" id="MathJax-Span-217">
             P
            </span>
            <span class="mo" id="MathJax-Span-218">
             (
            </span>
            <span class="mo" id="MathJax-Span-219">
             “
            </span>
            <span class="texatom" id="MathJax-Span-220">
             <span class="mrow" id="MathJax-Span-221">
              <span class="mo" id="MathJax-Span-222">
               办
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-223">
             <span class="mrow" id="MathJax-Span-224">
              <span class="mo" id="MathJax-Span-225">
               理
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-226">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-227">
             <span class="mrow" id="MathJax-Span-228">
              <span class="mo" id="MathJax-Span-229">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-230">
             H
            </span>
            <span class="mo" id="MathJax-Span-231">
             )
            </span>
            <span class="mi" id="MathJax-Span-232">
             P
            </span>
            <span class="mo" id="MathJax-Span-233">
             (
            </span>
            <span class="mo" id="MathJax-Span-234">
             “
            </span>
            <span class="texatom" id="MathJax-Span-235">
             <span class="mrow" id="MathJax-Span-236">
              <span class="mo" id="MathJax-Span-237">
               正
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-238">
             <span class="mrow" id="MathJax-Span-239">
              <span class="mo" id="MathJax-Span-240">
               规
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-241">
             <span class="mrow" id="MathJax-Span-242">
              <span class="mo" id="MathJax-Span-243">
               发
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-244">
             <span class="mrow" id="MathJax-Span-245">
              <span class="mo" id="MathJax-Span-246">
               票
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-247">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-248">
             <span class="mrow" id="MathJax-Span-249">
              <span class="mo" id="MathJax-Span-250">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-251">
             H
            </span>
            <span class="mo" id="MathJax-Span-252">
             )
            </span>
           </span>
          </span>
         </span>
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-4-Frame">
          <span class="math" id="MathJax-Span-253">
           <span class="mrow" id="MathJax-Span-254">
            <span class="mo" id="MathJax-Span-255">
             ×
            </span>
            <span class="mi" id="MathJax-Span-256">
             P
            </span>
            <span class="mo" id="MathJax-Span-257">
             (
            </span>
            <span class="mo" id="MathJax-Span-258">
             “
            </span>
            <span class="texatom" id="MathJax-Span-259">
             <span class="mrow" id="MathJax-Span-260">
              <span class="mo" id="MathJax-Span-261">
               保
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-262">
             <span class="mrow" id="MathJax-Span-263">
              <span class="mo" id="MathJax-Span-264">
               真
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-265">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-266">
             <span class="mrow" id="MathJax-Span-267">
              <span class="mo" id="MathJax-Span-268">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-269">
             H
            </span>
            <span class="mo" id="MathJax-Span-270">
             )
            </span>
            <span class="mi" id="MathJax-Span-271">
             P
            </span>
            <span class="mo" id="MathJax-Span-272">
             (
            </span>
            <span class="mo" id="MathJax-Span-273">
             “
            </span>
            <span class="texatom" id="MathJax-Span-274">
             <span class="mrow" id="MathJax-Span-275">
              <span class="mo" id="MathJax-Span-276">
               增
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-277">
             <span class="mrow" id="MathJax-Span-278">
              <span class="mo" id="MathJax-Span-279">
               值
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-280">
             <span class="mrow" id="MathJax-Span-281">
              <span class="mo" id="MathJax-Span-282">
               税
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-283">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-284">
             <span class="mrow" id="MathJax-Span-285">
              <span class="mo" id="MathJax-Span-286">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-287">
             H
            </span>
            <span class="mo" id="MathJax-Span-288">
             )
            </span>
            <span class="mi" id="MathJax-Span-289">
             P
            </span>
            <span class="mo" id="MathJax-Span-290">
             (
            </span>
            <span class="mo" id="MathJax-Span-291">
             “
            </span>
            <span class="texatom" id="MathJax-Span-292">
             <span class="mrow" id="MathJax-Span-293">
              <span class="mo" id="MathJax-Span-294">
               发
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-295">
             <span class="mrow" id="MathJax-Span-296">
              <span class="mo" id="MathJax-Span-297">
               票
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-298">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-299">
             <span class="mrow" id="MathJax-Span-300">
              <span class="mo" id="MathJax-Span-301">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-302">
             H
            </span>
            <span class="mo" id="MathJax-Span-303">
             )
            </span>
            <span class="mi" id="MathJax-Span-304">
             P
            </span>
            <span class="mo" id="MathJax-Span-305">
             (
            </span>
            <span class="mo" id="MathJax-Span-306">
             “
            </span>
            <span class="texatom" id="MathJax-Span-307">
             <span class="mrow" id="MathJax-Span-308">
              <span class="mo" id="MathJax-Span-309">
               点
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-310">
             <span class="mrow" id="MathJax-Span-311">
              <span class="mo" id="MathJax-Span-312">
               数
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-313">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-314">
             <span class="mrow" id="MathJax-Span-315">
              <span class="mo" id="MathJax-Span-316">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-317">
             H
            </span>
            <span class="mo" id="MathJax-Span-318">
             )
            </span>
            <span class="mi" id="MathJax-Span-319">
             P
            </span>
            <span class="mo" id="MathJax-Span-320">
             (
            </span>
            <span class="mo" id="MathJax-Span-321">
             “
            </span>
            <span class="texatom" id="MathJax-Span-322">
             <span class="mrow" id="MathJax-Span-323">
              <span class="mo" id="MathJax-Span-324">
               优
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-325">
             <span class="mrow" id="MathJax-Span-326">
              <span class="mo" id="MathJax-Span-327">
               惠
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-328">
             ”
            </span>
            <span class="texatom" id="MathJax-Span-329">
             <span class="mrow" id="MathJax-Span-330">
              <span class="mo" id="MathJax-Span-331">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-332">
             H
            </span>
            <span class="mo" id="MathJax-Span-333">
             )
            </span>
            <span class="mi" id="MathJax-Span-334">
             P
            </span>
            <span class="mo" id="MathJax-Span-335">
             (
            </span>
            <span class="mo" id="MathJax-Span-336">
             “
            </span>
            <span class="texatom" id="MathJax-Span-337">
             <span class="mrow" id="MathJax-Span-338">
              <span class="mo" id="MathJax-Span-339">
               正
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-340">
             <span class="mrow" id="MathJax-Span-341">
              <span class="mo" id="MathJax-Span-342">
               常
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-343">
             <span class="mrow" id="MathJax-Span-344">
              <span class="mo" id="MathJax-Span-345">
               邮
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-346">
             <span class="mrow" id="MathJax-Span-347">
              <span class="mo" id="MathJax-Span-348">
               件
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-349">
             ”
            </span>
            <span class="mo" id="MathJax-Span-350">
             )
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <p>
        但这里进行了
        <strong>
         很多乘法运算，计算的时间开销比较大
        </strong>
        。尤其是对于篇幅比较长的邮件，几万个数相乘起来还是非常花时间的。如果能
        <strong>
         把这些乘法变成加法则方便得多
        </strong>
        。刚好数学中的对数函数log就可以实现这样的功能。两边同时取对数（本文统一取底数为2），则上面的公式变为：
       </p>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-5-Frame">
          <span class="math" id="MathJax-Span-351">
           <span class="mrow" id="MathJax-Span-352">
            <span class="mi" id="MathJax-Span-353">
             l
            </span>
            <span class="mi" id="MathJax-Span-354">
             o
            </span>
            <span class="mi" id="MathJax-Span-355">
             g
            </span>
            <span class="texatom" id="MathJax-Span-356">
             <span class="mrow" id="MathJax-Span-357">
              <span class="mi" id="MathJax-Span-358">
               C
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-359">
             =
            </span>
            <span class="mi" id="MathJax-Span-360">
             l
            </span>
            <span class="mi" id="MathJax-Span-361">
             o
            </span>
            <span class="mi" id="MathJax-Span-362">
             g
            </span>
            <span class="texatom" id="MathJax-Span-363">
             <span class="mrow" id="MathJax-Span-364">
              <span class="mi" id="MathJax-Span-365">
               P
              </span>
              <span class="mo" id="MathJax-Span-366">
               (
              </span>
              <span class="mo" id="MathJax-Span-367">
               “
              </span>
              <span class="texatom" id="MathJax-Span-368">
               <span class="mrow" id="MathJax-Span-369">
                <span class="mo" id="MathJax-Span-370">
                 我
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-371">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-372">
               <span class="mrow" id="MathJax-Span-373">
                <span class="mo" id="MathJax-Span-374">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-375">
               S
              </span>
              <span class="mo" id="MathJax-Span-376">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-377">
             +
            </span>
            <span class="mi" id="MathJax-Span-378">
             l
            </span>
            <span class="mi" id="MathJax-Span-379">
             o
            </span>
            <span class="mi" id="MathJax-Span-380">
             g
            </span>
            <span class="texatom" id="MathJax-Span-381">
             <span class="mrow" id="MathJax-Span-382">
              <span class="mi" id="MathJax-Span-383">
               P
              </span>
              <span class="mo" id="MathJax-Span-384">
               (
              </span>
              <span class="mo" id="MathJax-Span-385">
               “
              </span>
              <span class="texatom" id="MathJax-Span-386">
               <span class="mrow" id="MathJax-Span-387">
                <span class="mo" id="MathJax-Span-388">
                 司
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-389">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-390">
               <span class="mrow" id="MathJax-Span-391">
                <span class="mo" id="MathJax-Span-392">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-393">
               S
              </span>
              <span class="mo" id="MathJax-Span-394">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-395">
             +
            </span>
            <span class="mi" id="MathJax-Span-396">
             l
            </span>
            <span class="mi" id="MathJax-Span-397">
             o
            </span>
            <span class="mi" id="MathJax-Span-398">
             g
            </span>
            <span class="texatom" id="MathJax-Span-399">
             <span class="mrow" id="MathJax-Span-400">
              <span class="mi" id="MathJax-Span-401">
               P
              </span>
              <span class="mo" id="MathJax-Span-402">
               (
              </span>
              <span class="mo" id="MathJax-Span-403">
               “
              </span>
              <span class="texatom" id="MathJax-Span-404">
               <span class="mrow" id="MathJax-Span-405">
                <span class="mo" id="MathJax-Span-406">
                 可
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-407">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-408">
               <span class="mrow" id="MathJax-Span-409">
                <span class="mo" id="MathJax-Span-410">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-411">
               S
              </span>
              <span class="mo" id="MathJax-Span-412">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-413">
             +
            </span>
            <span class="mi" id="MathJax-Span-414">
             l
            </span>
            <span class="mi" id="MathJax-Span-415">
             o
            </span>
            <span class="mi" id="MathJax-Span-416">
             g
            </span>
            <span class="texatom" id="MathJax-Span-417">
             <span class="mrow" id="MathJax-Span-418">
              <span class="mi" id="MathJax-Span-419">
               P
              </span>
              <span class="mo" id="MathJax-Span-420">
               (
              </span>
              <span class="mo" id="MathJax-Span-421">
               “
              </span>
              <span class="texatom" id="MathJax-Span-422">
               <span class="mrow" id="MathJax-Span-423">
                <span class="mo" id="MathJax-Span-424">
                 办
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-425">
               <span class="mrow" id="MathJax-Span-426">
                <span class="mo" id="MathJax-Span-427">
                 理
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-428">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-429">
               <span class="mrow" id="MathJax-Span-430">
                <span class="mo" id="MathJax-Span-431">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-432">
               S
              </span>
              <span class="mo" id="MathJax-Span-433">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-434">
             +
            </span>
            <span class="mi" id="MathJax-Span-435">
             l
            </span>
            <span class="mi" id="MathJax-Span-436">
             o
            </span>
            <span class="mi" id="MathJax-Span-437">
             g
            </span>
            <span class="texatom" id="MathJax-Span-438">
             <span class="mrow" id="MathJax-Span-439">
              <span class="mi" id="MathJax-Span-440">
               P
              </span>
              <span class="mo" id="MathJax-Span-441">
               (
              </span>
              <span class="mo" id="MathJax-Span-442">
               “
              </span>
              <span class="texatom" id="MathJax-Span-443">
               <span class="mrow" id="MathJax-Span-444">
                <span class="mo" id="MathJax-Span-445">
                 正
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-446">
               <span class="mrow" id="MathJax-Span-447">
                <span class="mo" id="MathJax-Span-448">
                 规
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-449">
               <span class="mrow" id="MathJax-Span-450">
                <span class="mo" id="MathJax-Span-451">
                 发
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-452">
               <span class="mrow" id="MathJax-Span-453">
                <span class="mo" id="MathJax-Span-454">
                 票
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-455">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-456">
               <span class="mrow" id="MathJax-Span-457">
                <span class="mo" id="MathJax-Span-458">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-459">
               S
              </span>
              <span class="mo" id="MathJax-Span-460">
               )
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-6-Frame">
          <span class="math" id="MathJax-Span-461">
           <span class="mrow" id="MathJax-Span-462">
            <span class="mo" id="MathJax-Span-463">
             +
            </span>
            <span class="mi" id="MathJax-Span-464">
             l
            </span>
            <span class="mi" id="MathJax-Span-465">
             o
            </span>
            <span class="mi" id="MathJax-Span-466">
             g
            </span>
            <span class="texatom" id="MathJax-Span-467">
             <span class="mrow" id="MathJax-Span-468">
              <span class="mi" id="MathJax-Span-469">
               P
              </span>
              <span class="mo" id="MathJax-Span-470">
               (
              </span>
              <span class="mo" id="MathJax-Span-471">
               “
              </span>
              <span class="texatom" id="MathJax-Span-472">
               <span class="mrow" id="MathJax-Span-473">
                <span class="mo" id="MathJax-Span-474">
                 保
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-475">
               <span class="mrow" id="MathJax-Span-476">
                <span class="mo" id="MathJax-Span-477">
                 真
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-478">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-479">
               <span class="mrow" id="MathJax-Span-480">
                <span class="mo" id="MathJax-Span-481">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-482">
               S
              </span>
              <span class="mo" id="MathJax-Span-483">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-484">
             +
            </span>
            <span class="mi" id="MathJax-Span-485">
             l
            </span>
            <span class="mi" id="MathJax-Span-486">
             o
            </span>
            <span class="mi" id="MathJax-Span-487">
             g
            </span>
            <span class="texatom" id="MathJax-Span-488">
             <span class="mrow" id="MathJax-Span-489">
              <span class="mi" id="MathJax-Span-490">
               P
              </span>
              <span class="mo" id="MathJax-Span-491">
               (
              </span>
              <span class="mo" id="MathJax-Span-492">
               “
              </span>
              <span class="texatom" id="MathJax-Span-493">
               <span class="mrow" id="MathJax-Span-494">
                <span class="mo" id="MathJax-Span-495">
                 增
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-496">
               <span class="mrow" id="MathJax-Span-497">
                <span class="mo" id="MathJax-Span-498">
                 值
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-499">
               <span class="mrow" id="MathJax-Span-500">
                <span class="mo" id="MathJax-Span-501">
                 税
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-502">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-503">
               <span class="mrow" id="MathJax-Span-504">
                <span class="mo" id="MathJax-Span-505">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-506">
               S
              </span>
              <span class="mo" id="MathJax-Span-507">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-508">
             +
            </span>
            <span class="mi" id="MathJax-Span-509">
             l
            </span>
            <span class="mi" id="MathJax-Span-510">
             o
            </span>
            <span class="mi" id="MathJax-Span-511">
             g
            </span>
            <span class="texatom" id="MathJax-Span-512">
             <span class="mrow" id="MathJax-Span-513">
              <span class="mi" id="MathJax-Span-514">
               P
              </span>
              <span class="mo" id="MathJax-Span-515">
               (
              </span>
              <span class="mo" id="MathJax-Span-516">
               “
              </span>
              <span class="texatom" id="MathJax-Span-517">
               <span class="mrow" id="MathJax-Span-518">
                <span class="mo" id="MathJax-Span-519">
                 发
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-520">
               <span class="mrow" id="MathJax-Span-521">
                <span class="mo" id="MathJax-Span-522">
                 票
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-523">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-524">
               <span class="mrow" id="MathJax-Span-525">
                <span class="mo" id="MathJax-Span-526">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-527">
               S
              </span>
              <span class="mo" id="MathJax-Span-528">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-529">
             +
            </span>
            <span class="mi" id="MathJax-Span-530">
             l
            </span>
            <span class="mi" id="MathJax-Span-531">
             o
            </span>
            <span class="mi" id="MathJax-Span-532">
             g
            </span>
            <span class="texatom" id="MathJax-Span-533">
             <span class="mrow" id="MathJax-Span-534">
              <span class="mi" id="MathJax-Span-535">
               P
              </span>
              <span class="mo" id="MathJax-Span-536">
               (
              </span>
              <span class="mo" id="MathJax-Span-537">
               “
              </span>
              <span class="texatom" id="MathJax-Span-538">
               <span class="mrow" id="MathJax-Span-539">
                <span class="mo" id="MathJax-Span-540">
                 点
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-541">
               <span class="mrow" id="MathJax-Span-542">
                <span class="mo" id="MathJax-Span-543">
                 数
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-544">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-545">
               <span class="mrow" id="MathJax-Span-546">
                <span class="mo" id="MathJax-Span-547">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-548">
               S
              </span>
              <span class="mo" id="MathJax-Span-549">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-550">
             +
            </span>
            <span class="mi" id="MathJax-Span-551">
             l
            </span>
            <span class="mi" id="MathJax-Span-552">
             o
            </span>
            <span class="mi" id="MathJax-Span-553">
             g
            </span>
            <span class="texatom" id="MathJax-Span-554">
             <span class="mrow" id="MathJax-Span-555">
              <span class="mi" id="MathJax-Span-556">
               P
              </span>
              <span class="mo" id="MathJax-Span-557">
               (
              </span>
              <span class="mo" id="MathJax-Span-558">
               “
              </span>
              <span class="texatom" id="MathJax-Span-559">
               <span class="mrow" id="MathJax-Span-560">
                <span class="mo" id="MathJax-Span-561">
                 优
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-562">
               <span class="mrow" id="MathJax-Span-563">
                <span class="mo" id="MathJax-Span-564">
                 惠
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-565">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-566">
               <span class="mrow" id="MathJax-Span-567">
                <span class="mo" id="MathJax-Span-568">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-569">
               S
              </span>
              <span class="mo" id="MathJax-Span-570">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-571">
             +
            </span>
            <span class="mi" id="MathJax-Span-572">
             l
            </span>
            <span class="mi" id="MathJax-Span-573">
             o
            </span>
            <span class="mi" id="MathJax-Span-574">
             g
            </span>
            <span class="texatom" id="MathJax-Span-575">
             <span class="mrow" id="MathJax-Span-576">
              <span class="mi" id="MathJax-Span-577">
               P
              </span>
              <span class="mo" id="MathJax-Span-578">
               (
              </span>
              <span class="mo" id="MathJax-Span-579">
               “
              </span>
              <span class="texatom" id="MathJax-Span-580">
               <span class="mrow" id="MathJax-Span-581">
                <span class="mo" id="MathJax-Span-582">
                 垃
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-583">
               <span class="mrow" id="MathJax-Span-584">
                <span class="mo" id="MathJax-Span-585">
                 圾
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-586">
               <span class="mrow" id="MathJax-Span-587">
                <span class="mo" id="MathJax-Span-588">
                 邮
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-589">
               <span class="mrow" id="MathJax-Span-590">
                <span class="mo" id="MathJax-Span-591">
                 件
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-592">
               ”
              </span>
              <span class="mo" id="MathJax-Span-593">
               )
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-7-Frame">
          <span class="math" id="MathJax-Span-594">
           <span class="mrow" id="MathJax-Span-595">
            <span class="mi" id="MathJax-Span-596">
             l
            </span>
            <span class="mi" id="MathJax-Span-597">
             o
            </span>
            <span class="mi" id="MathJax-Span-598">
             g
            </span>
            <span class="texatom" id="MathJax-Span-599">
             <span class="mrow" id="MathJax-Span-600">
              <span class="munderover" id="MathJax-Span-601">
               <span class="mi" id="MathJax-Span-602">
                C
               </span>
               <span class="mo" id="MathJax-Span-603">
                ¯¯¯
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-604">
             =
            </span>
            <span class="mi" id="MathJax-Span-605">
             l
            </span>
            <span class="mi" id="MathJax-Span-606">
             o
            </span>
            <span class="mi" id="MathJax-Span-607">
             g
            </span>
            <span class="texatom" id="MathJax-Span-608">
             <span class="mrow" id="MathJax-Span-609">
              <span class="mi" id="MathJax-Span-610">
               P
              </span>
              <span class="mo" id="MathJax-Span-611">
               (
              </span>
              <span class="mo" id="MathJax-Span-612">
               “
              </span>
              <span class="texatom" id="MathJax-Span-613">
               <span class="mrow" id="MathJax-Span-614">
                <span class="mo" id="MathJax-Span-615">
                 我
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-616">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-617">
               <span class="mrow" id="MathJax-Span-618">
                <span class="mo" id="MathJax-Span-619">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-620">
               H
              </span>
              <span class="mo" id="MathJax-Span-621">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-622">
             +
            </span>
            <span class="mi" id="MathJax-Span-623">
             l
            </span>
            <span class="mi" id="MathJax-Span-624">
             o
            </span>
            <span class="mi" id="MathJax-Span-625">
             g
            </span>
            <span class="texatom" id="MathJax-Span-626">
             <span class="mrow" id="MathJax-Span-627">
              <span class="mi" id="MathJax-Span-628">
               P
              </span>
              <span class="mo" id="MathJax-Span-629">
               (
              </span>
              <span class="mo" id="MathJax-Span-630">
               “
              </span>
              <span class="texatom" id="MathJax-Span-631">
               <span class="mrow" id="MathJax-Span-632">
                <span class="mo" id="MathJax-Span-633">
                 司
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-634">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-635">
               <span class="mrow" id="MathJax-Span-636">
                <span class="mo" id="MathJax-Span-637">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-638">
               H
              </span>
              <span class="mo" id="MathJax-Span-639">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-640">
             +
            </span>
            <span class="mi" id="MathJax-Span-641">
             l
            </span>
            <span class="mi" id="MathJax-Span-642">
             o
            </span>
            <span class="mi" id="MathJax-Span-643">
             g
            </span>
            <span class="texatom" id="MathJax-Span-644">
             <span class="mrow" id="MathJax-Span-645">
              <span class="mi" id="MathJax-Span-646">
               P
              </span>
              <span class="mo" id="MathJax-Span-647">
               (
              </span>
              <span class="mo" id="MathJax-Span-648">
               “
              </span>
              <span class="texatom" id="MathJax-Span-649">
               <span class="mrow" id="MathJax-Span-650">
                <span class="mo" id="MathJax-Span-651">
                 可
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-652">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-653">
               <span class="mrow" id="MathJax-Span-654">
                <span class="mo" id="MathJax-Span-655">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-656">
               H
              </span>
              <span class="mo" id="MathJax-Span-657">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-658">
             +
            </span>
            <span class="mi" id="MathJax-Span-659">
             l
            </span>
            <span class="mi" id="MathJax-Span-660">
             o
            </span>
            <span class="mi" id="MathJax-Span-661">
             g
            </span>
            <span class="texatom" id="MathJax-Span-662">
             <span class="mrow" id="MathJax-Span-663">
              <span class="mi" id="MathJax-Span-664">
               P
              </span>
              <span class="mo" id="MathJax-Span-665">
               (
              </span>
              <span class="mo" id="MathJax-Span-666">
               “
              </span>
              <span class="texatom" id="MathJax-Span-667">
               <span class="mrow" id="MathJax-Span-668">
                <span class="mo" id="MathJax-Span-669">
                 办
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-670">
               <span class="mrow" id="MathJax-Span-671">
                <span class="mo" id="MathJax-Span-672">
                 理
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-673">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-674">
               <span class="mrow" id="MathJax-Span-675">
                <span class="mo" id="MathJax-Span-676">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-677">
               H
              </span>
              <span class="mo" id="MathJax-Span-678">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-679">
             +
            </span>
            <span class="mi" id="MathJax-Span-680">
             l
            </span>
            <span class="mi" id="MathJax-Span-681">
             o
            </span>
            <span class="mi" id="MathJax-Span-682">
             g
            </span>
            <span class="texatom" id="MathJax-Span-683">
             <span class="mrow" id="MathJax-Span-684">
              <span class="mi" id="MathJax-Span-685">
               P
              </span>
              <span class="mo" id="MathJax-Span-686">
               (
              </span>
              <span class="mo" id="MathJax-Span-687">
               “
              </span>
              <span class="texatom" id="MathJax-Span-688">
               <span class="mrow" id="MathJax-Span-689">
                <span class="mo" id="MathJax-Span-690">
                 正
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-691">
               <span class="mrow" id="MathJax-Span-692">
                <span class="mo" id="MathJax-Span-693">
                 规
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-694">
               <span class="mrow" id="MathJax-Span-695">
                <span class="mo" id="MathJax-Span-696">
                 发
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-697">
               <span class="mrow" id="MathJax-Span-698">
                <span class="mo" id="MathJax-Span-699">
                 票
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-700">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-701">
               <span class="mrow" id="MathJax-Span-702">
                <span class="mo" id="MathJax-Span-703">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-704">
               H
              </span>
              <span class="mo" id="MathJax-Span-705">
               )
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-8-Frame">
          <span class="math" id="MathJax-Span-706">
           <span class="mrow" id="MathJax-Span-707">
            <span class="mo" id="MathJax-Span-708">
             +
            </span>
            <span class="mi" id="MathJax-Span-709">
             l
            </span>
            <span class="mi" id="MathJax-Span-710">
             o
            </span>
            <span class="mi" id="MathJax-Span-711">
             g
            </span>
            <span class="texatom" id="MathJax-Span-712">
             <span class="mrow" id="MathJax-Span-713">
              <span class="mi" id="MathJax-Span-714">
               P
              </span>
              <span class="mo" id="MathJax-Span-715">
               (
              </span>
              <span class="mo" id="MathJax-Span-716">
               “
              </span>
              <span class="texatom" id="MathJax-Span-717">
               <span class="mrow" id="MathJax-Span-718">
                <span class="mo" id="MathJax-Span-719">
                 保
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-720">
               <span class="mrow" id="MathJax-Span-721">
                <span class="mo" id="MathJax-Span-722">
                 真
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-723">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-724">
               <span class="mrow" id="MathJax-Span-725">
                <span class="mo" id="MathJax-Span-726">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-727">
               H
              </span>
              <span class="mo" id="MathJax-Span-728">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-729">
             +
            </span>
            <span class="mi" id="MathJax-Span-730">
             l
            </span>
            <span class="mi" id="MathJax-Span-731">
             o
            </span>
            <span class="mi" id="MathJax-Span-732">
             g
            </span>
            <span class="texatom" id="MathJax-Span-733">
             <span class="mrow" id="MathJax-Span-734">
              <span class="mi" id="MathJax-Span-735">
               P
              </span>
              <span class="mo" id="MathJax-Span-736">
               (
              </span>
              <span class="mo" id="MathJax-Span-737">
               “
              </span>
              <span class="texatom" id="MathJax-Span-738">
               <span class="mrow" id="MathJax-Span-739">
                <span class="mo" id="MathJax-Span-740">
                 增
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-741">
               <span class="mrow" id="MathJax-Span-742">
                <span class="mo" id="MathJax-Span-743">
                 值
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-744">
               <span class="mrow" id="MathJax-Span-745">
                <span class="mo" id="MathJax-Span-746">
                 税
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-747">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-748">
               <span class="mrow" id="MathJax-Span-749">
                <span class="mo" id="MathJax-Span-750">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-751">
               H
              </span>
              <span class="mo" id="MathJax-Span-752">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-753">
             +
            </span>
            <span class="mi" id="MathJax-Span-754">
             l
            </span>
            <span class="mi" id="MathJax-Span-755">
             o
            </span>
            <span class="mi" id="MathJax-Span-756">
             g
            </span>
            <span class="texatom" id="MathJax-Span-757">
             <span class="mrow" id="MathJax-Span-758">
              <span class="mi" id="MathJax-Span-759">
               P
              </span>
              <span class="mo" id="MathJax-Span-760">
               (
              </span>
              <span class="mo" id="MathJax-Span-761">
               “
              </span>
              <span class="texatom" id="MathJax-Span-762">
               <span class="mrow" id="MathJax-Span-763">
                <span class="mo" id="MathJax-Span-764">
                 发
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-765">
               <span class="mrow" id="MathJax-Span-766">
                <span class="mo" id="MathJax-Span-767">
                 票
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-768">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-769">
               <span class="mrow" id="MathJax-Span-770">
                <span class="mo" id="MathJax-Span-771">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-772">
               H
              </span>
              <span class="mo" id="MathJax-Span-773">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-774">
             +
            </span>
            <span class="mi" id="MathJax-Span-775">
             l
            </span>
            <span class="mi" id="MathJax-Span-776">
             o
            </span>
            <span class="mi" id="MathJax-Span-777">
             g
            </span>
            <span class="texatom" id="MathJax-Span-778">
             <span class="mrow" id="MathJax-Span-779">
              <span class="mi" id="MathJax-Span-780">
               P
              </span>
              <span class="mo" id="MathJax-Span-781">
               (
              </span>
              <span class="mo" id="MathJax-Span-782">
               “
              </span>
              <span class="texatom" id="MathJax-Span-783">
               <span class="mrow" id="MathJax-Span-784">
                <span class="mo" id="MathJax-Span-785">
                 点
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-786">
               <span class="mrow" id="MathJax-Span-787">
                <span class="mo" id="MathJax-Span-788">
                 数
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-789">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-790">
               <span class="mrow" id="MathJax-Span-791">
                <span class="mo" id="MathJax-Span-792">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-793">
               H
              </span>
              <span class="mo" id="MathJax-Span-794">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-795">
             +
            </span>
            <span class="mi" id="MathJax-Span-796">
             l
            </span>
            <span class="mi" id="MathJax-Span-797">
             o
            </span>
            <span class="mi" id="MathJax-Span-798">
             g
            </span>
            <span class="texatom" id="MathJax-Span-799">
             <span class="mrow" id="MathJax-Span-800">
              <span class="mi" id="MathJax-Span-801">
               P
              </span>
              <span class="mo" id="MathJax-Span-802">
               (
              </span>
              <span class="mo" id="MathJax-Span-803">
               “
              </span>
              <span class="texatom" id="MathJax-Span-804">
               <span class="mrow" id="MathJax-Span-805">
                <span class="mo" id="MathJax-Span-806">
                 优
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-807">
               <span class="mrow" id="MathJax-Span-808">
                <span class="mo" id="MathJax-Span-809">
                 惠
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-810">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-811">
               <span class="mrow" id="MathJax-Span-812">
                <span class="mo" id="MathJax-Span-813">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-814">
               H
              </span>
              <span class="mo" id="MathJax-Span-815">
               )
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-816">
             +
            </span>
            <span class="mi" id="MathJax-Span-817">
             l
            </span>
            <span class="mi" id="MathJax-Span-818">
             o
            </span>
            <span class="mi" id="MathJax-Span-819">
             g
            </span>
            <span class="texatom" id="MathJax-Span-820">
             <span class="mrow" id="MathJax-Span-821">
              <span class="mi" id="MathJax-Span-822">
               P
              </span>
              <span class="mo" id="MathJax-Span-823">
               (
              </span>
              <span class="mo" id="MathJax-Span-824">
               “
              </span>
              <span class="texatom" id="MathJax-Span-825">
               <span class="mrow" id="MathJax-Span-826">
                <span class="mo" id="MathJax-Span-827">
                 正
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-828">
               <span class="mrow" id="MathJax-Span-829">
                <span class="mo" id="MathJax-Span-830">
                 常
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-831">
               <span class="mrow" id="MathJax-Span-832">
                <span class="mo" id="MathJax-Span-833">
                 邮
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-834">
               <span class="mrow" id="MathJax-Span-835">
                <span class="mo" id="MathJax-Span-836">
                 件
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-837">
               ”
              </span>
              <span class="mo" id="MathJax-Span-838">
               )
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <p>
        有同学可能要叫了：“做对数运算岂不会也很花时间？”的确如此，但是可以在训练阶段直接计算
        <span class="MathJax" id="MathJax-Element-9-Frame">
         <span class="math" id="MathJax-Span-839">
          <span class="mrow" id="MathJax-Span-840">
           <span class="mi" id="MathJax-Span-841">
            l
           </span>
           <span class="mi" id="MathJax-Span-842">
            o
           </span>
           <span class="mi" id="MathJax-Span-843">
            g
           </span>
           <span class="texatom" id="MathJax-Span-844">
            <span class="mrow" id="MathJax-Span-845">
             <span class="mi" id="MathJax-Span-846">
              P
             </span>
            </span>
           </span>
          </span>
         </span>
        </span>
        ，然后把他们存在一张大的hash表里。
        <strong>
         在判断的时候直接提取hash表中已经计算好的对数概率，然后相加即可。这样使得判断所需要的计算时间被转移到了训练阶段
        </strong>
        ，实时运行的时候速度就比之前快得多，这可不止几个数量级的提升。
       </p>
       <h3 id="32-trick2转换为权重">
        <p name="t4">
        </p>
        3.2 trick2：转换为权重
       </h3>
       <p>
        对于二分类，我们还可以继续提高判断的速度。既然要比较
        <span class="MathJax" id="MathJax-Element-62-Frame">
         <span class="math" id="MathJax-Span-847">
          <span class="mrow" id="MathJax-Span-848">
           <span class="mi" id="MathJax-Span-849">
            l
           </span>
           <span class="mi" id="MathJax-Span-850">
            o
           </span>
           <span class="mi" id="MathJax-Span-851">
            g
           </span>
           <span class="texatom" id="MathJax-Span-852">
            <span class="mrow" id="MathJax-Span-853">
             <span class="mi" id="MathJax-Span-854">
              C
             </span>
            </span>
           </span>
          </span>
         </span>
        </span>
        和
        <span class="MathJax" id="MathJax-Element-63-Frame">
         <span class="math" id="MathJax-Span-855">
          <span class="mrow" id="MathJax-Span-856">
           <span class="mi" id="MathJax-Span-857">
            l
           </span>
           <span class="mi" id="MathJax-Span-858">
            o
           </span>
           <span class="mi" id="MathJax-Span-859">
            g
           </span>
           <span class="texatom" id="MathJax-Span-860">
            <span class="mrow" id="MathJax-Span-861">
             <span class="munderover" id="MathJax-Span-862">
              <span class="mi" id="MathJax-Span-863">
               C
              </span>
              <span class="mo" id="MathJax-Span-864">
               ¯¯¯
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </span>
        的大小，那就可以直接将上下两式相减，并继续化简：
       </p>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-64-Frame">
          <span class="math" id="MathJax-Span-865">
           <span class="mrow" id="MathJax-Span-866">
            <span class="mi" id="MathJax-Span-867">
             l
            </span>
            <span class="mi" id="MathJax-Span-868">
             o
            </span>
            <span class="mi" id="MathJax-Span-869">
             g
            </span>
            <span class="texatom" id="MathJax-Span-870">
             <span class="mrow" id="MathJax-Span-871">
              <span class="mfrac" id="MathJax-Span-872">
               <span class="mi" id="MathJax-Span-873">
                C
               </span>
               <span class="munderover" id="MathJax-Span-874">
                <span class="mi" id="MathJax-Span-875">
                 C
                </span>
                <span class="mo" id="MathJax-Span-876">
                 ¯
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-877">
             =
            </span>
            <span class="mi" id="MathJax-Span-878">
             l
            </span>
            <span class="mi" id="MathJax-Span-879">
             o
            </span>
            <span class="mi" id="MathJax-Span-880">
             g
            </span>
            <span class="texatom" id="MathJax-Span-881">
             <span class="mrow" id="MathJax-Span-882">
              <span class="mfrac" id="MathJax-Span-883">
               <span class="mrow" id="MathJax-Span-884">
                <span class="mi" id="MathJax-Span-885">
                 P
                </span>
                <span class="mo" id="MathJax-Span-886">
                 (
                </span>
                <span class="mo" id="MathJax-Span-887">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-888">
                 <span class="mrow" id="MathJax-Span-889">
                  <span class="mo" id="MathJax-Span-890">
                   我
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-891">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-892">
                 <span class="mrow" id="MathJax-Span-893">
                  <span class="mo" id="MathJax-Span-894">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-895">
                 S
                </span>
                <span class="mo" id="MathJax-Span-896">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-897">
                <span class="mi" id="MathJax-Span-898">
                 P
                </span>
                <span class="mo" id="MathJax-Span-899">
                 (
                </span>
                <span class="mo" id="MathJax-Span-900">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-901">
                 <span class="mrow" id="MathJax-Span-902">
                  <span class="mo" id="MathJax-Span-903">
                   我
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-904">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-905">
                 <span class="mrow" id="MathJax-Span-906">
                  <span class="mo" id="MathJax-Span-907">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-908">
                 H
                </span>
                <span class="mo" id="MathJax-Span-909">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-910">
             +
            </span>
            <span class="mi" id="MathJax-Span-911">
             l
            </span>
            <span class="mi" id="MathJax-Span-912">
             o
            </span>
            <span class="mi" id="MathJax-Span-913">
             g
            </span>
            <span class="texatom" id="MathJax-Span-914">
             <span class="mrow" id="MathJax-Span-915">
              <span class="mfrac" id="MathJax-Span-916">
               <span class="mrow" id="MathJax-Span-917">
                <span class="mi" id="MathJax-Span-918">
                 P
                </span>
                <span class="mo" id="MathJax-Span-919">
                 (
                </span>
                <span class="mo" id="MathJax-Span-920">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-921">
                 <span class="mrow" id="MathJax-Span-922">
                  <span class="mo" id="MathJax-Span-923">
                   司
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-924">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-925">
                 <span class="mrow" id="MathJax-Span-926">
                  <span class="mo" id="MathJax-Span-927">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-928">
                 S
                </span>
                <span class="mo" id="MathJax-Span-929">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-930">
                <span class="mi" id="MathJax-Span-931">
                 P
                </span>
                <span class="mo" id="MathJax-Span-932">
                 (
                </span>
                <span class="mo" id="MathJax-Span-933">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-934">
                 <span class="mrow" id="MathJax-Span-935">
                  <span class="mo" id="MathJax-Span-936">
                   司
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-937">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-938">
                 <span class="mrow" id="MathJax-Span-939">
                  <span class="mo" id="MathJax-Span-940">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-941">
                 H
                </span>
                <span class="mo" id="MathJax-Span-942">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-943">
             +
            </span>
            <span class="mi" id="MathJax-Span-944">
             l
            </span>
            <span class="mi" id="MathJax-Span-945">
             o
            </span>
            <span class="mi" id="MathJax-Span-946">
             g
            </span>
            <span class="texatom" id="MathJax-Span-947">
             <span class="mrow" id="MathJax-Span-948">
              <span class="mfrac" id="MathJax-Span-949">
               <span class="mrow" id="MathJax-Span-950">
                <span class="mi" id="MathJax-Span-951">
                 P
                </span>
                <span class="mo" id="MathJax-Span-952">
                 (
                </span>
                <span class="mo" id="MathJax-Span-953">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-954">
                 <span class="mrow" id="MathJax-Span-955">
                  <span class="mo" id="MathJax-Span-956">
                   可
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-957">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-958">
                 <span class="mrow" id="MathJax-Span-959">
                  <span class="mo" id="MathJax-Span-960">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-961">
                 S
                </span>
                <span class="mo" id="MathJax-Span-962">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-963">
                <span class="mi" id="MathJax-Span-964">
                 P
                </span>
                <span class="mo" id="MathJax-Span-965">
                 (
                </span>
                <span class="mo" id="MathJax-Span-966">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-967">
                 <span class="mrow" id="MathJax-Span-968">
                  <span class="mo" id="MathJax-Span-969">
                   可
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-970">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-971">
                 <span class="mrow" id="MathJax-Span-972">
                  <span class="mo" id="MathJax-Span-973">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-974">
                 H
                </span>
                <span class="mo" id="MathJax-Span-975">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-976">
             +
            </span>
            <span class="mi" id="MathJax-Span-977">
             l
            </span>
            <span class="mi" id="MathJax-Span-978">
             o
            </span>
            <span class="mi" id="MathJax-Span-979">
             g
            </span>
            <span class="texatom" id="MathJax-Span-980">
             <span class="mrow" id="MathJax-Span-981">
              <span class="mfrac" id="MathJax-Span-982">
               <span class="mrow" id="MathJax-Span-983">
                <span class="mi" id="MathJax-Span-984">
                 P
                </span>
                <span class="mo" id="MathJax-Span-985">
                 (
                </span>
                <span class="mo" id="MathJax-Span-986">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-987">
                 <span class="mrow" id="MathJax-Span-988">
                  <span class="mo" id="MathJax-Span-989">
                   办
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-990">
                 <span class="mrow" id="MathJax-Span-991">
                  <span class="mo" id="MathJax-Span-992">
                   理
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-993">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-994">
                 <span class="mrow" id="MathJax-Span-995">
                  <span class="mo" id="MathJax-Span-996">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-997">
                 S
                </span>
                <span class="mo" id="MathJax-Span-998">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-999">
                <span class="mi" id="MathJax-Span-1000">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1001">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1002">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1003">
                 <span class="mrow" id="MathJax-Span-1004">
                  <span class="mo" id="MathJax-Span-1005">
                   办
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1006">
                 <span class="mrow" id="MathJax-Span-1007">
                  <span class="mo" id="MathJax-Span-1008">
                   理
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1009">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1010">
                 <span class="mrow" id="MathJax-Span-1011">
                  <span class="mo" id="MathJax-Span-1012">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1013">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1014">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1015">
             +
            </span>
            <span class="mi" id="MathJax-Span-1016">
             l
            </span>
            <span class="mi" id="MathJax-Span-1017">
             o
            </span>
            <span class="mi" id="MathJax-Span-1018">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1019">
             <span class="mrow" id="MathJax-Span-1020">
              <span class="mfrac" id="MathJax-Span-1021">
               <span class="mrow" id="MathJax-Span-1022">
                <span class="mi" id="MathJax-Span-1023">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1024">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1025">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1026">
                 <span class="mrow" id="MathJax-Span-1027">
                  <span class="mo" id="MathJax-Span-1028">
                   正
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1029">
                 <span class="mrow" id="MathJax-Span-1030">
                  <span class="mo" id="MathJax-Span-1031">
                   规
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1032">
                 <span class="mrow" id="MathJax-Span-1033">
                  <span class="mo" id="MathJax-Span-1034">
                   发
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1035">
                 <span class="mrow" id="MathJax-Span-1036">
                  <span class="mo" id="MathJax-Span-1037">
                   票
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1038">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1039">
                 <span class="mrow" id="MathJax-Span-1040">
                  <span class="mo" id="MathJax-Span-1041">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1042">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1043">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1044">
                <span class="mi" id="MathJax-Span-1045">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1046">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1047">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1048">
                 <span class="mrow" id="MathJax-Span-1049">
                  <span class="mo" id="MathJax-Span-1050">
                   正
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1051">
                 <span class="mrow" id="MathJax-Span-1052">
                  <span class="mo" id="MathJax-Span-1053">
                   规
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1054">
                 <span class="mrow" id="MathJax-Span-1055">
                  <span class="mo" id="MathJax-Span-1056">
                   发
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1057">
                 <span class="mrow" id="MathJax-Span-1058">
                  <span class="mo" id="MathJax-Span-1059">
                   票
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1060">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1061">
                 <span class="mrow" id="MathJax-Span-1062">
                  <span class="mo" id="MathJax-Span-1063">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1064">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1065">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-65-Frame">
          <span class="math" id="MathJax-Span-1066">
           <span class="mrow" id="MathJax-Span-1067">
            <span class="mo" id="MathJax-Span-1068">
             +
            </span>
            <span class="mi" id="MathJax-Span-1069">
             l
            </span>
            <span class="mi" id="MathJax-Span-1070">
             o
            </span>
            <span class="mi" id="MathJax-Span-1071">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1072">
             <span class="mrow" id="MathJax-Span-1073">
              <span class="mfrac" id="MathJax-Span-1074">
               <span class="mrow" id="MathJax-Span-1075">
                <span class="mi" id="MathJax-Span-1076">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1077">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1078">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1079">
                 <span class="mrow" id="MathJax-Span-1080">
                  <span class="mo" id="MathJax-Span-1081">
                   保
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1082">
                 <span class="mrow" id="MathJax-Span-1083">
                  <span class="mo" id="MathJax-Span-1084">
                   真
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1085">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1086">
                 <span class="mrow" id="MathJax-Span-1087">
                  <span class="mo" id="MathJax-Span-1088">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1089">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1090">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1091">
                <span class="mi" id="MathJax-Span-1092">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1093">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1094">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1095">
                 <span class="mrow" id="MathJax-Span-1096">
                  <span class="mo" id="MathJax-Span-1097">
                   保
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1098">
                 <span class="mrow" id="MathJax-Span-1099">
                  <span class="mo" id="MathJax-Span-1100">
                   真
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1101">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1102">
                 <span class="mrow" id="MathJax-Span-1103">
                  <span class="mo" id="MathJax-Span-1104">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1105">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1106">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1107">
             +
            </span>
            <span class="mi" id="MathJax-Span-1108">
             l
            </span>
            <span class="mi" id="MathJax-Span-1109">
             o
            </span>
            <span class="mi" id="MathJax-Span-1110">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1111">
             <span class="mrow" id="MathJax-Span-1112">
              <span class="mfrac" id="MathJax-Span-1113">
               <span class="mrow" id="MathJax-Span-1114">
                <span class="mi" id="MathJax-Span-1115">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1116">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1117">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1118">
                 <span class="mrow" id="MathJax-Span-1119">
                  <span class="mo" id="MathJax-Span-1120">
                   增
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1121">
                 <span class="mrow" id="MathJax-Span-1122">
                  <span class="mo" id="MathJax-Span-1123">
                   值
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1124">
                 <span class="mrow" id="MathJax-Span-1125">
                  <span class="mo" id="MathJax-Span-1126">
                   税
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1127">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1128">
                 <span class="mrow" id="MathJax-Span-1129">
                  <span class="mo" id="MathJax-Span-1130">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1131">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1132">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1133">
                <span class="mi" id="MathJax-Span-1134">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1135">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1136">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1137">
                 <span class="mrow" id="MathJax-Span-1138">
                  <span class="mo" id="MathJax-Span-1139">
                   增
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1140">
                 <span class="mrow" id="MathJax-Span-1141">
                  <span class="mo" id="MathJax-Span-1142">
                   值
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1143">
                 <span class="mrow" id="MathJax-Span-1144">
                  <span class="mo" id="MathJax-Span-1145">
                   税
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1146">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1147">
                 <span class="mrow" id="MathJax-Span-1148">
                  <span class="mo" id="MathJax-Span-1149">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1150">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1151">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1152">
             +
            </span>
            <span class="mi" id="MathJax-Span-1153">
             l
            </span>
            <span class="mi" id="MathJax-Span-1154">
             o
            </span>
            <span class="mi" id="MathJax-Span-1155">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1156">
             <span class="mrow" id="MathJax-Span-1157">
              <span class="mfrac" id="MathJax-Span-1158">
               <span class="mrow" id="MathJax-Span-1159">
                <span class="mi" id="MathJax-Span-1160">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1161">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1162">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1163">
                 <span class="mrow" id="MathJax-Span-1164">
                  <span class="mo" id="MathJax-Span-1165">
                   发
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1166">
                 <span class="mrow" id="MathJax-Span-1167">
                  <span class="mo" id="MathJax-Span-1168">
                   票
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1169">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1170">
                 <span class="mrow" id="MathJax-Span-1171">
                  <span class="mo" id="MathJax-Span-1172">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1173">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1174">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1175">
                <span class="mi" id="MathJax-Span-1176">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1177">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1178">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1179">
                 <span class="mrow" id="MathJax-Span-1180">
                  <span class="mo" id="MathJax-Span-1181">
                   发
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1182">
                 <span class="mrow" id="MathJax-Span-1183">
                  <span class="mo" id="MathJax-Span-1184">
                   票
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1185">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1186">
                 <span class="mrow" id="MathJax-Span-1187">
                  <span class="mo" id="MathJax-Span-1188">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1189">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1190">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1191">
             +
            </span>
            <span class="mi" id="MathJax-Span-1192">
             l
            </span>
            <span class="mi" id="MathJax-Span-1193">
             o
            </span>
            <span class="mi" id="MathJax-Span-1194">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1195">
             <span class="mrow" id="MathJax-Span-1196">
              <span class="mfrac" id="MathJax-Span-1197">
               <span class="mrow" id="MathJax-Span-1198">
                <span class="mi" id="MathJax-Span-1199">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1200">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1201">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1202">
                 <span class="mrow" id="MathJax-Span-1203">
                  <span class="mo" id="MathJax-Span-1204">
                   点
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1205">
                 <span class="mrow" id="MathJax-Span-1206">
                  <span class="mo" id="MathJax-Span-1207">
                   数
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1208">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1209">
                 <span class="mrow" id="MathJax-Span-1210">
                  <span class="mo" id="MathJax-Span-1211">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1212">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1213">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1214">
                <span class="mi" id="MathJax-Span-1215">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1216">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1217">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1218">
                 <span class="mrow" id="MathJax-Span-1219">
                  <span class="mo" id="MathJax-Span-1220">
                   点
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1221">
                 <span class="mrow" id="MathJax-Span-1222">
                  <span class="mo" id="MathJax-Span-1223">
                   数
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1224">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1225">
                 <span class="mrow" id="MathJax-Span-1226">
                  <span class="mo" id="MathJax-Span-1227">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1228">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1229">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1230">
             +
            </span>
            <span class="mi" id="MathJax-Span-1231">
             l
            </span>
            <span class="mi" id="MathJax-Span-1232">
             o
            </span>
            <span class="mi" id="MathJax-Span-1233">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1234">
             <span class="mrow" id="MathJax-Span-1235">
              <span class="mfrac" id="MathJax-Span-1236">
               <span class="mrow" id="MathJax-Span-1237">
                <span class="mi" id="MathJax-Span-1238">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1239">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1240">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1241">
                 <span class="mrow" id="MathJax-Span-1242">
                  <span class="mo" id="MathJax-Span-1243">
                   优
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1244">
                 <span class="mrow" id="MathJax-Span-1245">
                  <span class="mo" id="MathJax-Span-1246">
                   惠
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1247">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1248">
                 <span class="mrow" id="MathJax-Span-1249">
                  <span class="mo" id="MathJax-Span-1250">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1251">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1252">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1253">
                <span class="mi" id="MathJax-Span-1254">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1255">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1256">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1257">
                 <span class="mrow" id="MathJax-Span-1258">
                  <span class="mo" id="MathJax-Span-1259">
                   优
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1260">
                 <span class="mrow" id="MathJax-Span-1261">
                  <span class="mo" id="MathJax-Span-1262">
                   惠
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1263">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1264">
                 <span class="mrow" id="MathJax-Span-1265">
                  <span class="mo" id="MathJax-Span-1266">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1267">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1268">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1269">
             +
            </span>
            <span class="mi" id="MathJax-Span-1270">
             l
            </span>
            <span class="mi" id="MathJax-Span-1271">
             o
            </span>
            <span class="mi" id="MathJax-Span-1272">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1273">
             <span class="mrow" id="MathJax-Span-1274">
              <span class="mfrac" id="MathJax-Span-1275">
               <span class="mrow" id="MathJax-Span-1276">
                <span class="mi" id="MathJax-Span-1277">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1278">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1279">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1280">
                 <span class="mrow" id="MathJax-Span-1281">
                  <span class="mo" id="MathJax-Span-1282">
                   正
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1283">
                 <span class="mrow" id="MathJax-Span-1284">
                  <span class="mo" id="MathJax-Span-1285">
                   常
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1286">
                 <span class="mrow" id="MathJax-Span-1287">
                  <span class="mo" id="MathJax-Span-1288">
                   邮
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1289">
                 <span class="mrow" id="MathJax-Span-1290">
                  <span class="mo" id="MathJax-Span-1291">
                   件
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1292">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1293">
                 <span class="mrow" id="MathJax-Span-1294">
                  <span class="mo" id="MathJax-Span-1295">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1296">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1297">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1298">
                <span class="mi" id="MathJax-Span-1299">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1300">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1301">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1302">
                 <span class="mrow" id="MathJax-Span-1303">
                  <span class="mo" id="MathJax-Span-1304">
                   正
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1305">
                 <span class="mrow" id="MathJax-Span-1306">
                  <span class="mo" id="MathJax-Span-1307">
                   常
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1308">
                 <span class="mrow" id="MathJax-Span-1309">
                  <span class="mo" id="MathJax-Span-1310">
                   邮
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1311">
                 <span class="mrow" id="MathJax-Span-1312">
                  <span class="mo" id="MathJax-Span-1313">
                   件
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1314">
                 ”
                </span>
                <span class="mo" id="MathJax-Span-1315">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <p>
        <strong>
         <span class="MathJax" id="MathJax-Element-66-Frame">
          <span class="math" id="MathJax-Span-1316">
           <span class="mrow" id="MathJax-Span-1317">
            <span class="mi" id="MathJax-Span-1318">
             l
            </span>
            <span class="mi" id="MathJax-Span-1319">
             o
            </span>
            <span class="mi" id="MathJax-Span-1320">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1321">
             <span class="mrow" id="MathJax-Span-1322">
              <span class="mfrac" id="MathJax-Span-1323">
               <span class="mi" id="MathJax-Span-1324">
                C
               </span>
               <span class="munderover" id="MathJax-Span-1325">
                <span class="mi" id="MathJax-Span-1326">
                 C
                </span>
                <span class="mo" id="MathJax-Span-1327">
                 ¯
                </span>
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
         如果大于0则属于垃圾邮件。我们可以把其中每一项作为其对应词语的权重
        </strong>
        ，比如
        <span class="MathJax" id="MathJax-Element-67-Frame">
         <span class="math" id="MathJax-Span-1328">
          <span class="mrow" id="MathJax-Span-1329">
           <span class="mi" id="MathJax-Span-1330">
            l
           </span>
           <span class="mi" id="MathJax-Span-1331">
            o
           </span>
           <span class="mi" id="MathJax-Span-1332">
            g
           </span>
           <span class="texatom" id="MathJax-Span-1333">
            <span class="mrow" id="MathJax-Span-1334">
             <span class="mfrac" id="MathJax-Span-1335">
              <span class="mrow" id="MathJax-Span-1336">
               <span class="mi" id="MathJax-Span-1337">
                P
               </span>
               <span class="mo" id="MathJax-Span-1338">
                (
               </span>
               <span class="mo" id="MathJax-Span-1339">
                “
               </span>
               <span class="texatom" id="MathJax-Span-1340">
                <span class="mrow" id="MathJax-Span-1341">
                 <span class="mo" id="MathJax-Span-1342">
                  发
                 </span>
                </span>
               </span>
               <span class="texatom" id="MathJax-Span-1343">
                <span class="mrow" id="MathJax-Span-1344">
                 <span class="mo" id="MathJax-Span-1345">
                  票
                 </span>
                </span>
               </span>
               <span class="mo" id="MathJax-Span-1346">
                ”
               </span>
               <span class="texatom" id="MathJax-Span-1347">
                <span class="mrow" id="MathJax-Span-1348">
                 <span class="mo" id="MathJax-Span-1349">
                  |
                 </span>
                </span>
               </span>
               <span class="mi" id="MathJax-Span-1350">
                S
               </span>
               <span class="mo" id="MathJax-Span-1351">
                )
               </span>
              </span>
              <span class="mrow" id="MathJax-Span-1352">
               <span class="mi" id="MathJax-Span-1353">
                P
               </span>
               <span class="mo" id="MathJax-Span-1354">
                (
               </span>
               <span class="mo" id="MathJax-Span-1355">
                “
               </span>
               <span class="texatom" id="MathJax-Span-1356">
                <span class="mrow" id="MathJax-Span-1357">
                 <span class="mo" id="MathJax-Span-1358">
                  发
                 </span>
                </span>
               </span>
               <span class="texatom" id="MathJax-Span-1359">
                <span class="mrow" id="MathJax-Span-1360">
                 <span class="mo" id="MathJax-Span-1361">
                  票
                 </span>
                </span>
               </span>
               <span class="mo" id="MathJax-Span-1362">
                ”
               </span>
               <span class="texatom" id="MathJax-Span-1363">
                <span class="mrow" id="MathJax-Span-1364">
                 <span class="mo" id="MathJax-Span-1365">
                  |
                 </span>
                </span>
               </span>
               <span class="mi" id="MathJax-Span-1366">
                H
               </span>
               <span class="mo" id="MathJax-Span-1367">
                )
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </span>
        就可以作为词语“发票”的权重，权重越大就越说明“发票”更可能是与“垃圾邮件”相关的特征。
        <strong>
         这样可以根据权重的大小来评估和筛选显著的特征，比如关键词。而这些权重值可以直接提前计算好而存在hash表中
        </strong>
        。判断的时候直接将权重求和即可。
       </p>
       <p>
        关键词hash表的样子如下，左列是权重，右列是其对应的词语，权重越高的说明越“关键”：
       </p>
       <p>
       </p>
       <center>
        <br/>
        <img src="http://7xnkcs.com1.z0.glb.clouddn.com/longxinchen_0203hash.jpg"/>
       </center>
       <p>
       </p>
       <h3 id="33-trick3选取topk的关键词">
        <p name="t5">
        </p>
        3.3 trick3：选取topk的关键词
       </h3>
       <p>
        前文说过可以通过提前选取关键词来提高判断的速度。有一种方法可以省略提前选取关键词的步骤，
        <strong>
         就是直接选取一段文本中权重最高的K个词语，将其权重进行加和
        </strong>
        。比如Paul Graham 在《黑客与画家》中是选取邮件中权重最高的15个词语计算的。
       </p>
       <p>
        通过权重hash表可知，如果是所有词语的权重，则权重有正有负。如果只选择权重最高的K个词语，则它们的权重基本都是正的。所以就不能像之前那样判断
        <span class="MathJax" id="MathJax-Element-71-Frame">
         <span class="math" id="MathJax-Span-1368">
          <span class="mrow" id="MathJax-Span-1369">
           <span class="mi" id="MathJax-Span-1370">
            l
           </span>
           <span class="mi" id="MathJax-Span-1371">
            o
           </span>
           <span class="mi" id="MathJax-Span-1372">
            g
           </span>
           <span class="texatom" id="MathJax-Span-1373">
            <span class="mrow" id="MathJax-Span-1374">
             <span class="mfrac" id="MathJax-Span-1375">
              <span class="mi" id="MathJax-Span-1376">
               C
              </span>
              <span class="munderover" id="MathJax-Span-1377">
               <span class="mi" id="MathJax-Span-1378">
                C
               </span>
               <span class="mo" id="MathJax-Span-1379">
                ¯
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </span>
        是否大于0来区分邮件了。而这
        <strong>
         需要依靠经验选定一个正数的阈值（门槛值）
        </strong>
        ，依据
        <span class="MathJax" id="MathJax-Element-72-Frame">
         <span class="math" id="MathJax-Span-1380">
          <span class="mrow" id="MathJax-Span-1381">
           <span class="mi" id="MathJax-Span-1382">
            l
           </span>
           <span class="mi" id="MathJax-Span-1383">
            o
           </span>
           <span class="mi" id="MathJax-Span-1384">
            g
           </span>
           <span class="texatom" id="MathJax-Span-1385">
            <span class="mrow" id="MathJax-Span-1386">
             <span class="mfrac" id="MathJax-Span-1387">
              <span class="mi" id="MathJax-Span-1388">
               C
              </span>
              <span class="munderover" id="MathJax-Span-1389">
               <span class="mi" id="MathJax-Span-1390">
                C
               </span>
               <span class="mo" id="MathJax-Span-1391">
                ¯
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </span>
        与该门槛值的大小来识别垃圾邮件。
       </p>
       <p>
        如下图所示，蓝色点代表垃圾邮件，绿色点代表正常邮件，横坐标为计算出来的
        <span class="MathJax" id="MathJax-Element-73-Frame">
         <span class="math" id="MathJax-Span-1392">
          <span class="mrow" id="MathJax-Span-1393">
           <span class="mi" id="MathJax-Span-1394">
            l
           </span>
           <span class="mi" id="MathJax-Span-1395">
            o
           </span>
           <span class="mi" id="MathJax-Span-1396">
            g
           </span>
           <span class="texatom" id="MathJax-Span-1397">
            <span class="mrow" id="MathJax-Span-1398">
             <span class="mfrac" id="MathJax-Span-1399">
              <span class="mi" id="MathJax-Span-1400">
               C
              </span>
              <span class="munderover" id="MathJax-Span-1401">
               <span class="mi" id="MathJax-Span-1402">
                C
               </span>
               <span class="mo" id="MathJax-Span-1403">
                ¯
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </span>
        值，中间的红线代表阈值。
       </p>
       <p>
       </p>
       <center>
        <br/>
        <img src="http://7xnkcs.com1.z0.glb.clouddn.com/longxinchen_0203%E5%9E%83%E5%9C%BE%E9%82%AE%E4%BB%B6%E5%8C%BA%E5%88%86.jpg"/>
       </center>
       <p>
       </p>
       <h3 id="34-trick4分割样本">
        <p name="t6">
        </p>
        3.4 trick4：分割样本
       </h3>
       <p>
        选取topk个词语的方法对于篇幅变动不大的邮件样本比较有效。但是对篇幅过大或者过小的邮件则会有判断误差。
       </p>
       <p>
        比如这个垃圾邮件的例子：（“我”,“司”,“可”,“办理”,“正规发票”,“保真”,“增值税”,“发票”,“点数”,“优惠”)。分词出了10个词语，其中有“正规发票”、“发票”2个关键词。关键词的密度还是蛮大的，应该算是敏感邮件。但因为采用最高15个词语的权重求和，并且相应的阈值是基于15个词的情况有效，可能算出来的结果还小于之前的阈值，这就造成漏判了。
       </p>
       <p>
        类似的，如果一封税务主题的邮件有1000个词语，其中只有“正规发票”、“发票”、“避税方法”3个权重比较大的词语，它们只是在正文表述中顺带提到的内容。关键词的密度被较长的篇幅稀释了，应该算是正常邮件。但是却被阈值判断成敏感邮件，造成误判了。
       </p>
       <p>
        <strong>
         这两种情况都说明topk关键词的方法需要考虑篇幅的影响
        </strong>
        。这里有许多种处理方式，
        <strong>
         它们的基本思想都是选取词语的个数及对应的阈值要与篇幅的大小成正比
        </strong>
        ，本文只介绍其中一种方方法：
       </p>
       <ul>
        <li>
         对于长篇幅邮件，按一定的大小，比如每500字，将其分割成小的文本段落，再对小文本段落采用topk关键词的方法。只要其中有一个小文本段落超过阈值就判断整封邮件是垃圾邮件。
        </li>
        <li>
         对于超短篇幅邮件，比如50字，可以按篇幅与标准比较篇幅的比例来选取topk，以确定应该匹配关键词语的个数。比如选取
         <span class="MathJax" id="MathJax-Element-19-Frame">
          <span class="math" id="MathJax-Span-1404">
           <span class="mrow" id="MathJax-Span-1405">
            <span class="mfrac" id="MathJax-Span-1406">
             <span class="mn" id="MathJax-Span-1407">
              50
             </span>
             <span class="mn" id="MathJax-Span-1408">
              500
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1409">
             ×
            </span>
            <span class="mn" id="MathJax-Span-1410">
             15
            </span>
            <span class="mo" id="MathJax-Span-1411">
             ≈
            </span>
            <span class="mn" id="MathJax-Span-1412">
             2
            </span>
           </span>
          </span>
         </span>
         个词语进行匹配，相应的阈值可以是之前阈值的
         <span class="MathJax" id="MathJax-Element-20-Frame">
          <span class="math" id="MathJax-Span-1413">
           <span class="mrow" id="MathJax-Span-1414">
            <span class="mfrac" id="MathJax-Span-1415">
             <span class="mn" id="MathJax-Span-1416">
              2
             </span>
             <span class="mn" id="MathJax-Span-1417">
              15
             </span>
            </span>
           </span>
          </span>
         </span>
         。以此来判断则更合理。
        </li>
       </ul>
       <h3 id="35-trick5位置权重">
        <p name="t7">
        </p>
        3.5 trick5：位置权重
       </h3>
       <p>
        到目前为止，我们对词语权重求和的过程都没有考虑邮件篇章结构的因素。比如“正规发票”如果出现在标题中应该比它出现在正文中对判断整个邮件的影响更大；而出现在段首句中又比其出现在段落正文中对判断整个邮件的影响更大。
        <strong>
         所以可以根据词语出现的位置，对其权重再乘以一个放大系数，以扩大其对整封邮件的影响，提高识别准确度
        </strong>
        。
       </p>
       <p>
        比如一封邮件其标题是“正规发票”（假设标题的放大系数为2），段首句是“发票”,“点数”,“优惠”（假设段首的放大系数为1.5），剩下的句子是（“我”,“司”,“可”,“办理”,“保真”）。则计算
        <span class="MathJax" id="MathJax-Element-21-Frame">
         <span class="math" id="MathJax-Span-1418">
          <span class="mrow" id="MathJax-Span-1419">
           <span class="mi" id="MathJax-Span-1420">
            l
           </span>
           <span class="mi" id="MathJax-Span-1421">
            o
           </span>
           <span class="mi" id="MathJax-Span-1422">
            g
           </span>
           <span class="texatom" id="MathJax-Span-1423">
            <span class="mrow" id="MathJax-Span-1424">
             <span class="mfrac" id="MathJax-Span-1425">
              <span class="mi" id="MathJax-Span-1426">
               C
              </span>
              <span class="munderover" id="MathJax-Span-1427">
               <span class="mi" id="MathJax-Span-1428">
                C
               </span>
               <span class="mo" id="MathJax-Span-1429">
                ¯
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </span>
        时的公式就可以调整为：
       </p>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-22-Frame">
          <span class="math" id="MathJax-Span-1430">
           <span class="mrow" id="MathJax-Span-1431">
            <span class="mi" id="MathJax-Span-1432">
             l
            </span>
            <span class="mi" id="MathJax-Span-1433">
             o
            </span>
            <span class="mi" id="MathJax-Span-1434">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1435">
             <span class="mrow" id="MathJax-Span-1436">
              <span class="mfrac" id="MathJax-Span-1437">
               <span class="mi" id="MathJax-Span-1438">
                C
               </span>
               <span class="munderover" id="MathJax-Span-1439">
                <span class="mi" id="MathJax-Span-1440">
                 C
                </span>
                <span class="mo" id="MathJax-Span-1441">
                 ¯
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1442">
             =
            </span>
            <span class="mn" id="MathJax-Span-1443">
             2
            </span>
            <span class="mo" id="MathJax-Span-1444">
             ×
            </span>
            <span class="mi" id="MathJax-Span-1445">
             l
            </span>
            <span class="mi" id="MathJax-Span-1446">
             o
            </span>
            <span class="mi" id="MathJax-Span-1447">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1448">
             <span class="mrow" id="MathJax-Span-1449">
              <span class="mfrac" id="MathJax-Span-1450">
               <span class="mrow" id="MathJax-Span-1451">
                <span class="mi" id="MathJax-Span-1452">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1453">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1454">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1455">
                 <span class="mrow" id="MathJax-Span-1456">
                  <span class="mo" id="MathJax-Span-1457">
                   正
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1458">
                 <span class="mrow" id="MathJax-Span-1459">
                  <span class="mo" id="MathJax-Span-1460">
                   规
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1461">
                 <span class="mrow" id="MathJax-Span-1462">
                  <span class="mo" id="MathJax-Span-1463">
                   发
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1464">
                 <span class="mrow" id="MathJax-Span-1465">
                  <span class="mo" id="MathJax-Span-1466">
                   票
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1467">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1468">
                 <span class="mrow" id="MathJax-Span-1469">
                  <span class="mo" id="MathJax-Span-1470">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1471">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1472">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1473">
                <span class="mi" id="MathJax-Span-1474">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1475">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1476">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1477">
                 <span class="mrow" id="MathJax-Span-1478">
                  <span class="mo" id="MathJax-Span-1479">
                   正
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1480">
                 <span class="mrow" id="MathJax-Span-1481">
                  <span class="mo" id="MathJax-Span-1482">
                   规
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1483">
                 <span class="mrow" id="MathJax-Span-1484">
                  <span class="mo" id="MathJax-Span-1485">
                   发
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1486">
                 <span class="mrow" id="MathJax-Span-1487">
                  <span class="mo" id="MathJax-Span-1488">
                   票
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1489">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1490">
                 <span class="mrow" id="MathJax-Span-1491">
                  <span class="mo" id="MathJax-Span-1492">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1493">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1494">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1495">
             +
            </span>
            <span class="mn" id="MathJax-Span-1496">
             1.5
            </span>
            <span class="mo" id="MathJax-Span-1497">
             ×
            </span>
            <span class="mi" id="MathJax-Span-1498">
             l
            </span>
            <span class="mi" id="MathJax-Span-1499">
             o
            </span>
            <span class="mi" id="MathJax-Span-1500">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1501">
             <span class="mrow" id="MathJax-Span-1502">
              <span class="mfrac" id="MathJax-Span-1503">
               <span class="mrow" id="MathJax-Span-1504">
                <span class="mi" id="MathJax-Span-1505">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1506">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1507">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1508">
                 <span class="mrow" id="MathJax-Span-1509">
                  <span class="mo" id="MathJax-Span-1510">
                   发
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1511">
                 <span class="mrow" id="MathJax-Span-1512">
                  <span class="mo" id="MathJax-Span-1513">
                   票
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1514">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1515">
                 <span class="mrow" id="MathJax-Span-1516">
                  <span class="mo" id="MathJax-Span-1517">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1518">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1519">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1520">
                <span class="mi" id="MathJax-Span-1521">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1522">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1523">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1524">
                 <span class="mrow" id="MathJax-Span-1525">
                  <span class="mo" id="MathJax-Span-1526">
                   发
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1527">
                 <span class="mrow" id="MathJax-Span-1528">
                  <span class="mo" id="MathJax-Span-1529">
                   票
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1530">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1531">
                 <span class="mrow" id="MathJax-Span-1532">
                  <span class="mo" id="MathJax-Span-1533">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1534">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1535">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1536">
             +
            </span>
            <span class="mn" id="MathJax-Span-1537">
             1.5
            </span>
            <span class="mo" id="MathJax-Span-1538">
             ×
            </span>
            <span class="mi" id="MathJax-Span-1539">
             l
            </span>
            <span class="mi" id="MathJax-Span-1540">
             o
            </span>
            <span class="mi" id="MathJax-Span-1541">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1542">
             <span class="mrow" id="MathJax-Span-1543">
              <span class="mfrac" id="MathJax-Span-1544">
               <span class="mrow" id="MathJax-Span-1545">
                <span class="mi" id="MathJax-Span-1546">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1547">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1548">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1549">
                 <span class="mrow" id="MathJax-Span-1550">
                  <span class="mo" id="MathJax-Span-1551">
                   点
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1552">
                 <span class="mrow" id="MathJax-Span-1553">
                  <span class="mo" id="MathJax-Span-1554">
                   数
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1555">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1556">
                 <span class="mrow" id="MathJax-Span-1557">
                  <span class="mo" id="MathJax-Span-1558">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1559">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1560">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1561">
                <span class="mi" id="MathJax-Span-1562">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1563">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1564">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1565">
                 <span class="mrow" id="MathJax-Span-1566">
                  <span class="mo" id="MathJax-Span-1567">
                   点
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1568">
                 <span class="mrow" id="MathJax-Span-1569">
                  <span class="mo" id="MathJax-Span-1570">
                   数
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1571">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1572">
                 <span class="mrow" id="MathJax-Span-1573">
                  <span class="mo" id="MathJax-Span-1574">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1575">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1576">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1577">
             +
            </span>
            <span class="mn" id="MathJax-Span-1578">
             1.5
            </span>
            <span class="mo" id="MathJax-Span-1579">
             ×
            </span>
            <span class="mi" id="MathJax-Span-1580">
             l
            </span>
            <span class="mi" id="MathJax-Span-1581">
             o
            </span>
            <span class="mi" id="MathJax-Span-1582">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1583">
             <span class="mrow" id="MathJax-Span-1584">
              <span class="mfrac" id="MathJax-Span-1585">
               <span class="mrow" id="MathJax-Span-1586">
                <span class="mi" id="MathJax-Span-1587">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1588">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1589">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1590">
                 <span class="mrow" id="MathJax-Span-1591">
                  <span class="mo" id="MathJax-Span-1592">
                   优
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1593">
                 <span class="mrow" id="MathJax-Span-1594">
                  <span class="mo" id="MathJax-Span-1595">
                   惠
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1596">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1597">
                 <span class="mrow" id="MathJax-Span-1598">
                  <span class="mo" id="MathJax-Span-1599">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1600">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1601">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1602">
                <span class="mi" id="MathJax-Span-1603">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1604">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1605">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1606">
                 <span class="mrow" id="MathJax-Span-1607">
                  <span class="mo" id="MathJax-Span-1608">
                   优
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1609">
                 <span class="mrow" id="MathJax-Span-1610">
                  <span class="mo" id="MathJax-Span-1611">
                   惠
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1612">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1613">
                 <span class="mrow" id="MathJax-Span-1614">
                  <span class="mo" id="MathJax-Span-1615">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1616">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1617">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-23-Frame">
          <span class="math" id="MathJax-Span-1618">
           <span class="mrow" id="MathJax-Span-1619">
            <span class="mo" id="MathJax-Span-1620">
             +
            </span>
            <span class="mi" id="MathJax-Span-1621">
             l
            </span>
            <span class="mi" id="MathJax-Span-1622">
             o
            </span>
            <span class="mi" id="MathJax-Span-1623">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1624">
             <span class="mrow" id="MathJax-Span-1625">
              <span class="mfrac" id="MathJax-Span-1626">
               <span class="mrow" id="MathJax-Span-1627">
                <span class="mi" id="MathJax-Span-1628">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1629">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1630">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1631">
                 <span class="mrow" id="MathJax-Span-1632">
                  <span class="mo" id="MathJax-Span-1633">
                   我
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1634">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1635">
                 <span class="mrow" id="MathJax-Span-1636">
                  <span class="mo" id="MathJax-Span-1637">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1638">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1639">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1640">
                <span class="mi" id="MathJax-Span-1641">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1642">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1643">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1644">
                 <span class="mrow" id="MathJax-Span-1645">
                  <span class="mo" id="MathJax-Span-1646">
                   我
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1647">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1648">
                 <span class="mrow" id="MathJax-Span-1649">
                  <span class="mo" id="MathJax-Span-1650">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1651">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1652">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1653">
             +
            </span>
            <span class="mi" id="MathJax-Span-1654">
             l
            </span>
            <span class="mi" id="MathJax-Span-1655">
             o
            </span>
            <span class="mi" id="MathJax-Span-1656">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1657">
             <span class="mrow" id="MathJax-Span-1658">
              <span class="mfrac" id="MathJax-Span-1659">
               <span class="mrow" id="MathJax-Span-1660">
                <span class="mi" id="MathJax-Span-1661">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1662">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1663">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1664">
                 <span class="mrow" id="MathJax-Span-1665">
                  <span class="mo" id="MathJax-Span-1666">
                   司
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1667">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1668">
                 <span class="mrow" id="MathJax-Span-1669">
                  <span class="mo" id="MathJax-Span-1670">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1671">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1672">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1673">
                <span class="mi" id="MathJax-Span-1674">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1675">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1676">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1677">
                 <span class="mrow" id="MathJax-Span-1678">
                  <span class="mo" id="MathJax-Span-1679">
                   司
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1680">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1681">
                 <span class="mrow" id="MathJax-Span-1682">
                  <span class="mo" id="MathJax-Span-1683">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1684">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1685">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1686">
             +
            </span>
            <span class="mi" id="MathJax-Span-1687">
             l
            </span>
            <span class="mi" id="MathJax-Span-1688">
             o
            </span>
            <span class="mi" id="MathJax-Span-1689">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1690">
             <span class="mrow" id="MathJax-Span-1691">
              <span class="mfrac" id="MathJax-Span-1692">
               <span class="mrow" id="MathJax-Span-1693">
                <span class="mi" id="MathJax-Span-1694">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1695">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1696">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1697">
                 <span class="mrow" id="MathJax-Span-1698">
                  <span class="mo" id="MathJax-Span-1699">
                   可
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1700">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1701">
                 <span class="mrow" id="MathJax-Span-1702">
                  <span class="mo" id="MathJax-Span-1703">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1704">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1705">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1706">
                <span class="mi" id="MathJax-Span-1707">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1708">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1709">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1710">
                 <span class="mrow" id="MathJax-Span-1711">
                  <span class="mo" id="MathJax-Span-1712">
                   可
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1713">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1714">
                 <span class="mrow" id="MathJax-Span-1715">
                  <span class="mo" id="MathJax-Span-1716">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1717">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1718">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1719">
             +
            </span>
            <span class="mi" id="MathJax-Span-1720">
             l
            </span>
            <span class="mi" id="MathJax-Span-1721">
             o
            </span>
            <span class="mi" id="MathJax-Span-1722">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1723">
             <span class="mrow" id="MathJax-Span-1724">
              <span class="mfrac" id="MathJax-Span-1725">
               <span class="mrow" id="MathJax-Span-1726">
                <span class="mi" id="MathJax-Span-1727">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1728">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1729">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1730">
                 <span class="mrow" id="MathJax-Span-1731">
                  <span class="mo" id="MathJax-Span-1732">
                   办
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1733">
                 <span class="mrow" id="MathJax-Span-1734">
                  <span class="mo" id="MathJax-Span-1735">
                   理
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1736">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1737">
                 <span class="mrow" id="MathJax-Span-1738">
                  <span class="mo" id="MathJax-Span-1739">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1740">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1741">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1742">
                <span class="mi" id="MathJax-Span-1743">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1744">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1745">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1746">
                 <span class="mrow" id="MathJax-Span-1747">
                  <span class="mo" id="MathJax-Span-1748">
                   办
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1749">
                 <span class="mrow" id="MathJax-Span-1750">
                  <span class="mo" id="MathJax-Span-1751">
                   理
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1752">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1753">
                 <span class="mrow" id="MathJax-Span-1754">
                  <span class="mo" id="MathJax-Span-1755">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1756">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1757">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1758">
             +
            </span>
            <span class="mi" id="MathJax-Span-1759">
             l
            </span>
            <span class="mi" id="MathJax-Span-1760">
             o
            </span>
            <span class="mi" id="MathJax-Span-1761">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1762">
             <span class="mrow" id="MathJax-Span-1763">
              <span class="mfrac" id="MathJax-Span-1764">
               <span class="mrow" id="MathJax-Span-1765">
                <span class="mi" id="MathJax-Span-1766">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1767">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1768">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1769">
                 <span class="mrow" id="MathJax-Span-1770">
                  <span class="mo" id="MathJax-Span-1771">
                   保
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1772">
                 <span class="mrow" id="MathJax-Span-1773">
                  <span class="mo" id="MathJax-Span-1774">
                   真
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1775">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1776">
                 <span class="mrow" id="MathJax-Span-1777">
                  <span class="mo" id="MathJax-Span-1778">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1779">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1780">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1781">
                <span class="mi" id="MathJax-Span-1782">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1783">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1784">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1785">
                 <span class="mrow" id="MathJax-Span-1786">
                  <span class="mo" id="MathJax-Span-1787">
                   保
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1788">
                 <span class="mrow" id="MathJax-Span-1789">
                  <span class="mo" id="MathJax-Span-1790">
                   真
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1791">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1792">
                 <span class="mrow" id="MathJax-Span-1793">
                  <span class="mo" id="MathJax-Span-1794">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1795">
                 H
                </span>
                <span class="mo" id="MathJax-Span-1796">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-1797">
             +
            </span>
            <span class="mi" id="MathJax-Span-1798">
             l
            </span>
            <span class="mi" id="MathJax-Span-1799">
             o
            </span>
            <span class="mi" id="MathJax-Span-1800">
             g
            </span>
            <span class="texatom" id="MathJax-Span-1801">
             <span class="mrow" id="MathJax-Span-1802">
              <span class="mfrac" id="MathJax-Span-1803">
               <span class="mrow" id="MathJax-Span-1804">
                <span class="mi" id="MathJax-Span-1805">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1806">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1807">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1808">
                 <span class="mrow" id="MathJax-Span-1809">
                  <span class="mo" id="MathJax-Span-1810">
                   正
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1811">
                 <span class="mrow" id="MathJax-Span-1812">
                  <span class="mo" id="MathJax-Span-1813">
                   常
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1814">
                 <span class="mrow" id="MathJax-Span-1815">
                  <span class="mo" id="MathJax-Span-1816">
                   邮
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1817">
                 <span class="mrow" id="MathJax-Span-1818">
                  <span class="mo" id="MathJax-Span-1819">
                   件
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1820">
                 ”
                </span>
                <span class="texatom" id="MathJax-Span-1821">
                 <span class="mrow" id="MathJax-Span-1822">
                  <span class="mo" id="MathJax-Span-1823">
                   |
                  </span>
                 </span>
                </span>
                <span class="mi" id="MathJax-Span-1824">
                 S
                </span>
                <span class="mo" id="MathJax-Span-1825">
                 )
                </span>
               </span>
               <span class="mrow" id="MathJax-Span-1826">
                <span class="mi" id="MathJax-Span-1827">
                 P
                </span>
                <span class="mo" id="MathJax-Span-1828">
                 (
                </span>
                <span class="mo" id="MathJax-Span-1829">
                 “
                </span>
                <span class="texatom" id="MathJax-Span-1830">
                 <span class="mrow" id="MathJax-Span-1831">
                  <span class="mo" id="MathJax-Span-1832">
                   正
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1833">
                 <span class="mrow" id="MathJax-Span-1834">
                  <span class="mo" id="MathJax-Span-1835">
                   常
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1836">
                 <span class="mrow" id="MathJax-Span-1837">
                  <span class="mo" id="MathJax-Span-1838">
                   邮
                  </span>
                 </span>
                </span>
                <span class="texatom" id="MathJax-Span-1839">
                 <span class="mrow" id="MathJax-Span-1840">
                  <span class="mo" id="MathJax-Span-1841">
                   件
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-1842">
                 ”
                </span>
                <span class="mo" id="MathJax-Span-1843">
                 )
                </span>
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <h3 id="36-trick6蜜罐">
        <p name="t8">
        </p>
        3.6 trick6：蜜罐
       </h3>
       <p>
        我们通过辛辛苦苦的统计与计算，好不容易得到了不同词语的权重。然而这并不是一劳永逸的。我们我们之前交代过，
        <strong>
         词语及其权重会随着时间不断变化，需要时不时地用最新的样本来训练以更新词语及其权重
        </strong>
        。
       </p>
       <p>
        而搜集最新垃圾邮件有一个技巧，就是随便注册一些邮箱，然后将它们公布在各大论坛上。接下来就坐等一个月，到时候收到的邮件就绝大部分都是垃圾邮件了（好奸诈）。再找一些正常的邮件，基本就能够训练了。这些用于自动搜集垃圾邮件的邮箱叫做“蜜罐”。
        <strong>
         “蜜罐”是网络安全领域常用的手段，因其原理类似诱捕昆虫的装有蜜的罐子而得名
        </strong>
        。比如杀毒软件公司会利用蜜罐来监视或获得计算机网络中的病毒样本、攻击行为等。
       </p>
       <h2 id="4-贝叶斯方法的思维方式">
        <p name="t9">
        </p>
        4. 贝叶斯方法的思维方式
       </h2>
       <p>
        讲了这么多tricks，但这些手段都是建立在贝叶斯方法基础之上的。因此有必要探讨一下贝叶斯方法的思维方式，以便更好地应用这种方法解决实际问题。
       </p>
       <h3 id="41-逆概问题">
        <p name="t10">
        </p>
        4.1 逆概问题
       </h3>
       <p>
        我们重新看一眼贝叶斯公式：
       </p>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-24-Frame">
          <span class="math" id="MathJax-Span-1844">
           <span class="mrow" id="MathJax-Span-1845">
            <span class="mi" id="MathJax-Span-1846">
             P
            </span>
            <span class="mo" id="MathJax-Span-1847">
             (
            </span>
            <span class="mi" id="MathJax-Span-1848">
             Y
            </span>
            <span class="texatom" id="MathJax-Span-1849">
             <span class="mrow" id="MathJax-Span-1850">
              <span class="mo" id="MathJax-Span-1851">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-1852">
             X
            </span>
            <span class="mo" id="MathJax-Span-1853">
             )
            </span>
            <span class="mo" id="MathJax-Span-1854">
             =
            </span>
            <span class="mfrac" id="MathJax-Span-1855">
             <span class="mrow" id="MathJax-Span-1856">
              <span class="mi" id="MathJax-Span-1857">
               P
              </span>
              <span class="mo" id="MathJax-Span-1858">
               (
              </span>
              <span class="mi" id="MathJax-Span-1859">
               X
              </span>
              <span class="texatom" id="MathJax-Span-1860">
               <span class="mrow" id="MathJax-Span-1861">
                <span class="mo" id="MathJax-Span-1862">
                 |
                </span>
               </span>
              </span>
              <span class="mi" id="MathJax-Span-1863">
               Y
              </span>
              <span class="mo" id="MathJax-Span-1864">
               )
              </span>
              <span class="mi" id="MathJax-Span-1865">
               P
              </span>
              <span class="mo" id="MathJax-Span-1866">
               (
              </span>
              <span class="mi" id="MathJax-Span-1867">
               Y
              </span>
              <span class="mo" id="MathJax-Span-1868">
               )
              </span>
             </span>
             <span class="mrow" id="MathJax-Span-1869">
              <span class="mi" id="MathJax-Span-1870">
               P
              </span>
              <span class="mo" id="MathJax-Span-1871">
               (
              </span>
              <span class="mi" id="MathJax-Span-1872">
               X
              </span>
              <span class="mo" id="MathJax-Span-1873">
               )
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <p>
        先不考虑先验概率
        <span class="MathJax" id="MathJax-Element-25-Frame">
         <span class="math" id="MathJax-Span-1874">
          <span class="mrow" id="MathJax-Span-1875">
           <span class="mi" id="MathJax-Span-1876">
            P
           </span>
           <span class="mo" id="MathJax-Span-1877">
            (
           </span>
           <span class="mi" id="MathJax-Span-1878">
            Y
           </span>
           <span class="mo" id="MathJax-Span-1879">
            )
           </span>
           <span class="texatom" id="MathJax-Span-1880">
            <span class="mrow" id="MathJax-Span-1881">
             <span class="mo" id="MathJax-Span-1882">
              与
             </span>
            </span>
           </span>
           <span class="mi" id="MathJax-Span-1883">
            P
           </span>
           <span class="mo" id="MathJax-Span-1884">
            (
           </span>
           <span class="mi" id="MathJax-Span-1885">
            X
           </span>
           <span class="mo" id="MathJax-Span-1886">
            )
           </span>
          </span>
         </span>
        </span>
        ，观察两个后验概率
        <span class="MathJax" id="MathJax-Element-26-Frame">
         <span class="math" id="MathJax-Span-1887">
          <span class="mrow" id="MathJax-Span-1888">
           <span class="mi" id="MathJax-Span-1889">
            P
           </span>
           <span class="mo" id="MathJax-Span-1890">
            (
           </span>
           <span class="mi" id="MathJax-Span-1891">
            Y
           </span>
           <span class="texatom" id="MathJax-Span-1892">
            <span class="mrow" id="MathJax-Span-1893">
             <span class="mo" id="MathJax-Span-1894">
              |
             </span>
            </span>
           </span>
           <span class="mi" id="MathJax-Span-1895">
            X
           </span>
           <span class="mo" id="MathJax-Span-1896">
            )
           </span>
           <span class="texatom" id="MathJax-Span-1897">
            <span class="mrow" id="MathJax-Span-1898">
             <span class="mo" id="MathJax-Span-1899">
              与
             </span>
            </span>
           </span>
           <span class="mi" id="MathJax-Span-1900">
            P
           </span>
           <span class="mo" id="MathJax-Span-1901">
            (
           </span>
           <span class="mi" id="MathJax-Span-1902">
            X
           </span>
           <span class="texatom" id="MathJax-Span-1903">
            <span class="mrow" id="MathJax-Span-1904">
             <span class="mo" id="MathJax-Span-1905">
              |
             </span>
            </span>
           </span>
           <span class="mi" id="MathJax-Span-1906">
            Y
           </span>
           <span class="mo" id="MathJax-Span-1907">
            )
           </span>
          </span>
         </span>
        </span>
        ，可见贝叶斯公式能够揭示
        <strong>
         两个相反方向的条件概率之间的转换关系
        </strong>
        。
       </p>
       <p>
        从贝叶斯公式的发现历史来看，其就是为了处理所谓“逆概”问题而诞生的。比如
        <span class="MathJax" id="MathJax-Element-27-Frame">
         <span class="math" id="MathJax-Span-1908">
          <span class="mrow" id="MathJax-Span-1909">
           <span class="mi" id="MathJax-Span-1910">
            P
           </span>
           <span class="mo" id="MathJax-Span-1911">
            (
           </span>
           <span class="mi" id="MathJax-Span-1912">
            Y
           </span>
           <span class="texatom" id="MathJax-Span-1913">
            <span class="mrow" id="MathJax-Span-1914">
             <span class="mo" id="MathJax-Span-1915">
              |
             </span>
            </span>
           </span>
           <span class="mi" id="MathJax-Span-1916">
            X
           </span>
           <span class="mo" id="MathJax-Span-1917">
            )
           </span>
          </span>
         </span>
        </span>
        不能通过直接观测来得到结果，而
        <span class="MathJax" id="MathJax-Element-28-Frame">
         <span class="math" id="MathJax-Span-1918">
          <span class="mrow" id="MathJax-Span-1919">
           <span class="mi" id="MathJax-Span-1920">
            P
           </span>
           <span class="mo" id="MathJax-Span-1921">
            (
           </span>
           <span class="mi" id="MathJax-Span-1922">
            X
           </span>
           <span class="texatom" id="MathJax-Span-1923">
            <span class="mrow" id="MathJax-Span-1924">
             <span class="mo" id="MathJax-Span-1925">
              |
             </span>
            </span>
           </span>
           <span class="mi" id="MathJax-Span-1926">
            Y
           </span>
           <span class="mo" id="MathJax-Span-1927">
            )
           </span>
          </span>
         </span>
        </span>
        却容易通过直接观测得到结果，就可以通过贝叶斯公式
        <strong>
         从间接地观测对象去推断不可直接观测的对象的情况
        </strong>
        。
       </p>
       <p>
        好吧，我们说人话。基于邮件的文本内容判断其属于垃圾邮件的概率不好求（不可通过直接观测、统计得到），但是基于已经搜集好的垃圾邮件样本，去统计（直接观测）其文本内部各个词语的概率却非常方便。这就可以用贝叶斯方法。
       </p>
       <p>
        引申一步，基于样本特征去判断其所属标签的概率不好求，但是基于已经搜集好的打上标签的样本（有监督），却可以直接统计属于同一标签的样本内部各个特征的概率分布。因此贝叶斯方法的理论视角适用于一切分类问题的求解。
       </p>
       <h3 id="42-处理多分类问题">
        <p name="t11">
        </p>
        4.2 处理多分类问题
       </h3>
       <p>
        前面我们一直在探讨二分类（判断题）问题，现在可以引申到多分类（单选题）问题了。
       </p>
       <p>
        还是用邮件分类的例子，这是现在不只要判断垃圾邮件，还要将正常邮件细分为私人邮件、工作邮件。现在有这3类邮件各1万封作为样本。需要训练出一个贝叶斯分类器。这里依次用
        <span class="MathJax" id="MathJax-Element-29-Frame">
         <span class="math" id="MathJax-Span-1928">
          <span class="mrow" id="MathJax-Span-1929">
           <span class="msubsup" id="MathJax-Span-1930">
            <span class="mi" id="MathJax-Span-1931">
             Y
            </span>
            <span class="mn" id="MathJax-Span-1932">
             1
            </span>
           </span>
           <span class="mo" id="MathJax-Span-1933">
            ,
           </span>
           <span class="msubsup" id="MathJax-Span-1934">
            <span class="mi" id="MathJax-Span-1935">
             Y
            </span>
            <span class="mn" id="MathJax-Span-1936">
             2
            </span>
           </span>
           <span class="mo" id="MathJax-Span-1937">
            ,
           </span>
           <span class="msubsup" id="MathJax-Span-1938">
            <span class="mi" id="MathJax-Span-1939">
             Y
            </span>
            <span class="mn" id="MathJax-Span-1940">
             3
            </span>
           </span>
          </span>
         </span>
        </span>
        表示这三类邮件，用
        <span class="MathJax" id="MathJax-Element-30-Frame">
         <span class="math" id="MathJax-Span-1941">
          <span class="mrow" id="MathJax-Span-1942">
           <span class="mi" id="MathJax-Span-1943">
            X
           </span>
          </span>
         </span>
        </span>
        表示被判断的邮件。套用贝叶斯公式有：
       </p>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-31-Frame">
          <span class="math" id="MathJax-Span-1944">
           <span class="mrow" id="MathJax-Span-1945">
            <span class="mi" id="MathJax-Span-1946">
             P
            </span>
            <span class="mo" id="MathJax-Span-1947">
             (
            </span>
            <span class="msubsup" id="MathJax-Span-1948">
             <span class="mi" id="MathJax-Span-1949">
              Y
             </span>
             <span class="mn" id="MathJax-Span-1950">
              1
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-1951">
             <span class="mrow" id="MathJax-Span-1952">
              <span class="mo" id="MathJax-Span-1953">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-1954">
             X
            </span>
            <span class="mo" id="MathJax-Span-1955">
             )
            </span>
            <span class="mo" id="MathJax-Span-1956">
             =
            </span>
            <span class="mfrac" id="MathJax-Span-1957">
             <span class="mrow" id="MathJax-Span-1958">
              <span class="mi" id="MathJax-Span-1959">
               P
              </span>
              <span class="mo" id="MathJax-Span-1960">
               (
              </span>
              <span class="mi" id="MathJax-Span-1961">
               X
              </span>
              <span class="texatom" id="MathJax-Span-1962">
               <span class="mrow" id="MathJax-Span-1963">
                <span class="mo" id="MathJax-Span-1964">
                 |
                </span>
               </span>
              </span>
              <span class="msubsup" id="MathJax-Span-1965">
               <span class="mi" id="MathJax-Span-1966">
                Y
               </span>
               <span class="mn" id="MathJax-Span-1967">
                1
               </span>
              </span>
              <span class="mo" id="MathJax-Span-1968">
               )
              </span>
              <span class="mi" id="MathJax-Span-1969">
               P
              </span>
              <span class="mo" id="MathJax-Span-1970">
               (
              </span>
              <span class="msubsup" id="MathJax-Span-1971">
               <span class="mi" id="MathJax-Span-1972">
                Y
               </span>
               <span class="mn" id="MathJax-Span-1973">
                1
               </span>
              </span>
              <span class="mo" id="MathJax-Span-1974">
               )
              </span>
             </span>
             <span class="mrow" id="MathJax-Span-1975">
              <span class="mi" id="MathJax-Span-1976">
               P
              </span>
              <span class="mo" id="MathJax-Span-1977">
               (
              </span>
              <span class="mi" id="MathJax-Span-1978">
               X
              </span>
              <span class="mo" id="MathJax-Span-1979">
               )
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-32-Frame">
          <span class="math" id="MathJax-Span-1980">
           <span class="mrow" id="MathJax-Span-1981">
            <span class="mi" id="MathJax-Span-1982">
             P
            </span>
            <span class="mo" id="MathJax-Span-1983">
             (
            </span>
            <span class="msubsup" id="MathJax-Span-1984">
             <span class="mi" id="MathJax-Span-1985">
              Y
             </span>
             <span class="mn" id="MathJax-Span-1986">
              2
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-1987">
             <span class="mrow" id="MathJax-Span-1988">
              <span class="mo" id="MathJax-Span-1989">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-1990">
             X
            </span>
            <span class="mo" id="MathJax-Span-1991">
             )
            </span>
            <span class="mo" id="MathJax-Span-1992">
             =
            </span>
            <span class="mfrac" id="MathJax-Span-1993">
             <span class="mrow" id="MathJax-Span-1994">
              <span class="mi" id="MathJax-Span-1995">
               P
              </span>
              <span class="mo" id="MathJax-Span-1996">
               (
              </span>
              <span class="mi" id="MathJax-Span-1997">
               X
              </span>
              <span class="texatom" id="MathJax-Span-1998">
               <span class="mrow" id="MathJax-Span-1999">
                <span class="mo" id="MathJax-Span-2000">
                 |
                </span>
               </span>
              </span>
              <span class="msubsup" id="MathJax-Span-2001">
               <span class="mi" id="MathJax-Span-2002">
                Y
               </span>
               <span class="mn" id="MathJax-Span-2003">
                2
               </span>
              </span>
              <span class="mo" id="MathJax-Span-2004">
               )
              </span>
              <span class="mi" id="MathJax-Span-2005">
               P
              </span>
              <span class="mo" id="MathJax-Span-2006">
               (
              </span>
              <span class="msubsup" id="MathJax-Span-2007">
               <span class="mi" id="MathJax-Span-2008">
                Y
               </span>
               <span class="mn" id="MathJax-Span-2009">
                2
               </span>
              </span>
              <span class="mo" id="MathJax-Span-2010">
               )
              </span>
             </span>
             <span class="mrow" id="MathJax-Span-2011">
              <span class="mi" id="MathJax-Span-2012">
               P
              </span>
              <span class="mo" id="MathJax-Span-2013">
               (
              </span>
              <span class="mi" id="MathJax-Span-2014">
               X
              </span>
              <span class="mo" id="MathJax-Span-2015">
               )
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-33-Frame">
          <span class="math" id="MathJax-Span-2016">
           <span class="mrow" id="MathJax-Span-2017">
            <span class="mi" id="MathJax-Span-2018">
             P
            </span>
            <span class="mo" id="MathJax-Span-2019">
             (
            </span>
            <span class="msubsup" id="MathJax-Span-2020">
             <span class="mi" id="MathJax-Span-2021">
              Y
             </span>
             <span class="mn" id="MathJax-Span-2022">
              3
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2023">
             <span class="mrow" id="MathJax-Span-2024">
              <span class="mo" id="MathJax-Span-2025">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2026">
             X
            </span>
            <span class="mo" id="MathJax-Span-2027">
             )
            </span>
            <span class="mo" id="MathJax-Span-2028">
             =
            </span>
            <span class="mfrac" id="MathJax-Span-2029">
             <span class="mrow" id="MathJax-Span-2030">
              <span class="mi" id="MathJax-Span-2031">
               P
              </span>
              <span class="mo" id="MathJax-Span-2032">
               (
              </span>
              <span class="mi" id="MathJax-Span-2033">
               X
              </span>
              <span class="texatom" id="MathJax-Span-2034">
               <span class="mrow" id="MathJax-Span-2035">
                <span class="mo" id="MathJax-Span-2036">
                 |
                </span>
               </span>
              </span>
              <span class="msubsup" id="MathJax-Span-2037">
               <span class="mi" id="MathJax-Span-2038">
                Y
               </span>
               <span class="mn" id="MathJax-Span-2039">
                3
               </span>
              </span>
              <span class="mo" id="MathJax-Span-2040">
               )
              </span>
              <span class="mi" id="MathJax-Span-2041">
               P
              </span>
              <span class="mo" id="MathJax-Span-2042">
               (
              </span>
              <span class="msubsup" id="MathJax-Span-2043">
               <span class="mi" id="MathJax-Span-2044">
                Y
               </span>
               <span class="mn" id="MathJax-Span-2045">
                3
               </span>
              </span>
              <span class="mo" id="MathJax-Span-2046">
               )
              </span>
             </span>
             <span class="mrow" id="MathJax-Span-2047">
              <span class="mi" id="MathJax-Span-2048">
               P
              </span>
              <span class="mo" id="MathJax-Span-2049">
               (
              </span>
              <span class="mi" id="MathJax-Span-2050">
               X
              </span>
              <span class="mo" id="MathJax-Span-2051">
               )
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <p>
        通过比较3个概率值的大小即可得到
        <span class="MathJax" id="MathJax-Element-34-Frame">
         <span class="math" id="MathJax-Span-2052">
          <span class="mrow" id="MathJax-Span-2053">
           <span class="mi" id="MathJax-Span-2054">
            X
           </span>
          </span>
         </span>
        </span>
        所属的分类。发现三个式子的分母
        <span class="MathJax" id="MathJax-Element-35-Frame">
         <span class="math" id="MathJax-Span-2055">
          <span class="mrow" id="MathJax-Span-2056">
           <span class="mi" id="MathJax-Span-2057">
            P
           </span>
           <span class="mo" id="MathJax-Span-2058">
            (
           </span>
           <span class="mi" id="MathJax-Span-2059">
            X
           </span>
           <span class="mo" id="MathJax-Span-2060">
            )
           </span>
          </span>
         </span>
        </span>
        一样，比较大小时可以忽略不计，于是就可以用下面这一个式子表达上面3式：
       </p>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-36-Frame">
          <span class="math" id="MathJax-Span-2061">
           <span class="mrow" id="MathJax-Span-2062">
            <span class="mi" id="MathJax-Span-2063">
             P
            </span>
            <span class="mo" id="MathJax-Span-2064">
             (
            </span>
            <span class="msubsup" id="MathJax-Span-2065">
             <span class="mi" id="MathJax-Span-2066">
              Y
             </span>
             <span class="mi" id="MathJax-Span-2067">
              i
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2068">
             <span class="mrow" id="MathJax-Span-2069">
              <span class="mo" id="MathJax-Span-2070">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2071">
             X
            </span>
            <span class="mo" id="MathJax-Span-2072">
             )
            </span>
            <span class="mo" id="MathJax-Span-2073">
             ∝
            </span>
            <span class="mi" id="MathJax-Span-2074">
             P
            </span>
            <span class="mo" id="MathJax-Span-2075">
             (
            </span>
            <span class="mi" id="MathJax-Span-2076">
             X
            </span>
            <span class="texatom" id="MathJax-Span-2077">
             <span class="mrow" id="MathJax-Span-2078">
              <span class="mo" id="MathJax-Span-2079">
               |
              </span>
             </span>
            </span>
            <span class="msubsup" id="MathJax-Span-2080">
             <span class="mi" id="MathJax-Span-2081">
              Y
             </span>
             <span class="mi" id="MathJax-Span-2082">
              i
             </span>
            </span>
            <span class="mo" id="MathJax-Span-2083">
             )
            </span>
            <span class="mi" id="MathJax-Span-2084">
             P
            </span>
            <span class="mo" id="MathJax-Span-2085">
             (
            </span>
            <span class="msubsup" id="MathJax-Span-2086">
             <span class="mi" id="MathJax-Span-2087">
              Y
             </span>
             <span class="mi" id="MathJax-Span-2088">
              i
             </span>
            </span>
            <span class="mo" id="MathJax-Span-2089">
             )
            </span>
            <span class="texatom" id="MathJax-Span-2090">
             <span class="mrow" id="MathJax-Span-2091">
              <span class="mo" id="MathJax-Span-2092">
               ；
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2093">
             i
            </span>
            <span class="mo" id="MathJax-Span-2094">
             =
            </span>
            <span class="mn" id="MathJax-Span-2095">
             1
            </span>
            <span class="mo" id="MathJax-Span-2096">
             ,
            </span>
            <span class="mn" id="MathJax-Span-2097">
             2
            </span>
            <span class="mo" id="MathJax-Span-2098">
             ,
            </span>
            <span class="mn" id="MathJax-Span-2099">
             3
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <p>
        其中
        <span class="MathJax" id="MathJax-Element-37-Frame">
         <span class="math" id="MathJax-Span-2100">
          <span class="mrow" id="MathJax-Span-2101">
           <span class="mo" id="MathJax-Span-2102">
            ∝
           </span>
          </span>
         </span>
        </span>
        表示“正比于”。而
        <span class="MathJax" id="MathJax-Element-38-Frame">
         <span class="math" id="MathJax-Span-2103">
          <span class="mrow" id="MathJax-Span-2104">
           <span class="mi" id="MathJax-Span-2105">
            P
           </span>
           <span class="mo" id="MathJax-Span-2106">
            (
           </span>
           <span class="mi" id="MathJax-Span-2107">
            X
           </span>
           <span class="texatom" id="MathJax-Span-2108">
            <span class="mrow" id="MathJax-Span-2109">
             <span class="mo" id="MathJax-Span-2110">
              |
             </span>
            </span>
           </span>
           <span class="msubsup" id="MathJax-Span-2111">
            <span class="mi" id="MathJax-Span-2112">
             Y
            </span>
            <span class="mi" id="MathJax-Span-2113">
             i
            </span>
           </span>
           <span class="mo" id="MathJax-Span-2114">
            )
           </span>
          </span>
         </span>
        </span>
        则有个特别高逼格的名字叫做“
        <strong>
         似然函数
        </strong>
        ”。我们上大学的时候也被这个名字搞得晕晕乎乎的，其实它也是个概率，直接理解成
        <strong>
         “
         <span class="MathJax" id="MathJax-Element-39-Frame">
          <span class="math" id="MathJax-Span-2115">
           <span class="mrow" id="MathJax-Span-2116">
            <span class="mi" id="MathJax-Span-2117">
             P
            </span>
            <span class="mo" id="MathJax-Span-2118">
             (
            </span>
            <span class="msubsup" id="MathJax-Span-2119">
             <span class="mi" id="MathJax-Span-2120">
              Y
             </span>
             <span class="mi" id="MathJax-Span-2121">
              i
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2122">
             <span class="mrow" id="MathJax-Span-2123">
              <span class="mo" id="MathJax-Span-2124">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2125">
             X
            </span>
            <span class="mo" id="MathJax-Span-2126">
             )
            </span>
           </span>
          </span>
         </span>
         的逆反条件概率”
        </strong>
        就方便了。
       </p>
       <p>
        这里只是以垃圾邮件3分类问题举了个例子，
        <strong>
         对于任意多分类的问题都可以用这样的思路去理解。比如新闻分类、情感喜怒哀乐分类等等
        </strong>
        。
       </p>
       <h3 id="43-先验概率的问题">
        <p name="t12">
        </p>
        4.3 先验概率的问题
       </h3>
       <p>
        在垃圾邮件的例子中，先验概率都相等，
        <span class="MathJax" id="MathJax-Element-40-Frame">
         <span class="math" id="MathJax-Span-2127">
          <span class="mrow" id="MathJax-Span-2128">
           <span class="mi" id="MathJax-Span-2129">
            P
           </span>
           <span class="mo" id="MathJax-Span-2130">
            (
           </span>
           <span class="msubsup" id="MathJax-Span-2131">
            <span class="mi" id="MathJax-Span-2132">
             Y
            </span>
            <span class="mn" id="MathJax-Span-2133">
             1
            </span>
           </span>
           <span class="mo" id="MathJax-Span-2134">
            )
           </span>
           <span class="mo" id="MathJax-Span-2135">
            =
           </span>
           <span class="mi" id="MathJax-Span-2136">
            P
           </span>
           <span class="mo" id="MathJax-Span-2137">
            (
           </span>
           <span class="msubsup" id="MathJax-Span-2138">
            <span class="mi" id="MathJax-Span-2139">
             Y
            </span>
            <span class="mn" id="MathJax-Span-2140">
             2
            </span>
           </span>
           <span class="mo" id="MathJax-Span-2141">
            )
           </span>
           <span class="mo" id="MathJax-Span-2142">
            =
           </span>
           <span class="mi" id="MathJax-Span-2143">
            P
           </span>
           <span class="mo" id="MathJax-Span-2144">
            (
           </span>
           <span class="msubsup" id="MathJax-Span-2145">
            <span class="mi" id="MathJax-Span-2146">
             Y
            </span>
            <span class="mn" id="MathJax-Span-2147">
             3
            </span>
           </span>
           <span class="mo" id="MathJax-Span-2148">
            )
           </span>
           <span class="mo" id="MathJax-Span-2149">
            =
           </span>
           <span class="mn" id="MathJax-Span-2150">
            10000
           </span>
           <span class="texatom" id="MathJax-Span-2151">
            <span class="mrow" id="MathJax-Span-2152">
             <span class="mo" id="MathJax-Span-2153">
              /
             </span>
            </span>
           </span>
           <span class="mn" id="MathJax-Span-2154">
            30000
           </span>
           <span class="mo" id="MathJax-Span-2155">
            =
           </span>
           <span class="mn" id="MathJax-Span-2156">
            1
           </span>
           <span class="texatom" id="MathJax-Span-2157">
            <span class="mrow" id="MathJax-Span-2158">
             <span class="mo" id="MathJax-Span-2159">
              /
             </span>
            </span>
           </span>
           <span class="mn" id="MathJax-Span-2160">
            3
           </span>
          </span>
         </span>
        </span>
        ，所以上面是式子又可以进一步化简：
       </p>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-41-Frame">
          <span class="math" id="MathJax-Span-2161">
           <span class="mrow" id="MathJax-Span-2162">
            <span class="mi" id="MathJax-Span-2163">
             P
            </span>
            <span class="mo" id="MathJax-Span-2164">
             (
            </span>
            <span class="msubsup" id="MathJax-Span-2165">
             <span class="mi" id="MathJax-Span-2166">
              Y
             </span>
             <span class="mi" id="MathJax-Span-2167">
              i
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2168">
             <span class="mrow" id="MathJax-Span-2169">
              <span class="mo" id="MathJax-Span-2170">
               |
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2171">
             X
            </span>
            <span class="mo" id="MathJax-Span-2172">
             )
            </span>
            <span class="mo" id="MathJax-Span-2173">
             ∝
            </span>
            <span class="mi" id="MathJax-Span-2174">
             P
            </span>
            <span class="mo" id="MathJax-Span-2175">
             (
            </span>
            <span class="mi" id="MathJax-Span-2176">
             X
            </span>
            <span class="texatom" id="MathJax-Span-2177">
             <span class="mrow" id="MathJax-Span-2178">
              <span class="mo" id="MathJax-Span-2179">
               |
              </span>
             </span>
            </span>
            <span class="msubsup" id="MathJax-Span-2180">
             <span class="mi" id="MathJax-Span-2181">
              Y
             </span>
             <span class="mi" id="MathJax-Span-2182">
              i
             </span>
            </span>
            <span class="mo" id="MathJax-Span-2183">
             )
            </span>
            <span class="texatom" id="MathJax-Span-2184">
             <span class="mrow" id="MathJax-Span-2185">
              <span class="mo" id="MathJax-Span-2186">
               ；
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2187">
             i
            </span>
            <span class="mo" id="MathJax-Span-2188">
             =
            </span>
            <span class="mn" id="MathJax-Span-2189">
             1
            </span>
            <span class="mo" id="MathJax-Span-2190">
             ,
            </span>
            <span class="mn" id="MathJax-Span-2191">
             2
            </span>
            <span class="mo" id="MathJax-Span-2192">
             ,
            </span>
            <span class="mn" id="MathJax-Span-2193">
             3
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <p>
        只需比较右边式子（也就是“似然函数”）的大小就可以了。这种方法就是传说中的
        <strong>
         最大似然法
        </strong>
        :不考虑先验概率而直接比较似然函数。
       </p>
       <p>
        关于选出最佳分类
        <span class="MathJax" id="MathJax-Element-42-Frame">
         <span class="math" id="MathJax-Span-2194">
          <span class="mrow" id="MathJax-Span-2195">
           <span class="msubsup" id="MathJax-Span-2196">
            <span class="mi" id="MathJax-Span-2197">
             Y
            </span>
            <span class="mi" id="MathJax-Span-2198">
             i
            </span>
           </span>
          </span>
         </span>
        </span>
        是否要考虑先验概率
        <span class="MathJax" id="MathJax-Element-43-Frame">
         <span class="math" id="MathJax-Span-2199">
          <span class="mrow" id="MathJax-Span-2200">
           <span class="mi" id="MathJax-Span-2201">
            P
           </span>
           <span class="mo" id="MathJax-Span-2202">
            (
           </span>
           <span class="msubsup" id="MathJax-Span-2203">
            <span class="mi" id="MathJax-Span-2204">
             Y
            </span>
            <span class="mi" id="MathJax-Span-2205">
             i
            </span>
           </span>
           <span class="mo" id="MathJax-Span-2206">
            )
           </span>
          </span>
         </span>
        </span>
        的问题，曾经在频率学派和贝叶斯学派之间产生了激烈的教派冲突。统计学家（频率学派）说：我们让数据自己说话。言下之意就是要摒弃先验概率。而贝叶斯学派支持者则说：数据会有各种各样的偏差，而一个
        <strong>
         靠谱的先验概率
        </strong>
        则可以对这些随机噪音做到健壮。对此有兴趣的同学可以找更多资料进行了解，本文在此不做更多的引申，只基于垃圾邮件识别的例子进行探讨。
       </p>
       <p>
        比如我们在采集垃圾邮件样本的时候，不小心delete掉了一半的数据，就剩下5000封邮件。则计算出来的先验概率为:
       </p>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-44-Frame">
          <span class="math" id="MathJax-Span-2207">
           <span class="mrow" id="MathJax-Span-2208">
            <span class="mi" id="MathJax-Span-2209">
             P
            </span>
            <span class="mo" id="MathJax-Span-2210">
             (
            </span>
            <span class="msubsup" id="MathJax-Span-2211">
             <span class="mi" id="MathJax-Span-2212">
              Y
             </span>
             <span class="mn" id="MathJax-Span-2213">
              1
             </span>
            </span>
            <span class="mo" id="MathJax-Span-2214">
             )
            </span>
            <span class="mo" id="MathJax-Span-2215">
             =
            </span>
            <span class="mn" id="MathJax-Span-2216">
             5000
            </span>
            <span class="texatom" id="MathJax-Span-2217">
             <span class="mrow" id="MathJax-Span-2218">
              <span class="mo" id="MathJax-Span-2219">
               /
              </span>
             </span>
            </span>
            <span class="mn" id="MathJax-Span-2220">
             25000
            </span>
            <span class="mo" id="MathJax-Span-2221">
             =
            </span>
            <span class="mn" id="MathJax-Span-2222">
             1
            </span>
            <span class="texatom" id="MathJax-Span-2223">
             <span class="mrow" id="MathJax-Span-2224">
              <span class="mo" id="MathJax-Span-2225">
               /
              </span>
             </span>
            </span>
            <span class="mn" id="MathJax-Span-2226">
             5
            </span>
           </span>
          </span>
         </span>
         ，
        </p>
        <p>
         <span class="MathJax" id="MathJax-Element-45-Frame">
          <span class="math" id="MathJax-Span-2227">
           <span class="mrow" id="MathJax-Span-2228">
            <span class="mi" id="MathJax-Span-2229">
             P
            </span>
            <span class="mo" id="MathJax-Span-2230">
             (
            </span>
            <span class="msubsup" id="MathJax-Span-2231">
             <span class="mi" id="MathJax-Span-2232">
              Y
             </span>
             <span class="mn" id="MathJax-Span-2233">
              2
             </span>
            </span>
            <span class="mo" id="MathJax-Span-2234">
             )
            </span>
            <span class="mo" id="MathJax-Span-2235">
             =
            </span>
            <span class="mi" id="MathJax-Span-2236">
             P
            </span>
            <span class="mo" id="MathJax-Span-2237">
             (
            </span>
            <span class="msubsup" id="MathJax-Span-2238">
             <span class="mi" id="MathJax-Span-2239">
              Y
             </span>
             <span class="mn" id="MathJax-Span-2240">
              3
             </span>
            </span>
            <span class="mo" id="MathJax-Span-2241">
             )
            </span>
            <span class="mo" id="MathJax-Span-2242">
             =
            </span>
            <span class="mn" id="MathJax-Span-2243">
             10000
            </span>
            <span class="texatom" id="MathJax-Span-2244">
             <span class="mrow" id="MathJax-Span-2245">
              <span class="mo" id="MathJax-Span-2246">
               /
              </span>
             </span>
            </span>
            <span class="mn" id="MathJax-Span-2247">
             25000
            </span>
            <span class="mo" id="MathJax-Span-2248">
             =
            </span>
            <span class="mn" id="MathJax-Span-2249">
             2
            </span>
            <span class="texatom" id="MathJax-Span-2250">
             <span class="mrow" id="MathJax-Span-2251">
              <span class="mo" id="MathJax-Span-2252">
               /
              </span>
             </span>
            </span>
            <span class="mn" id="MathJax-Span-2253">
             5
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <p>
        如果还用贝叶斯方法,就要在似然函数后面乘上先验概率。比如之前用最大似然法算出
        <span class="MathJax" id="MathJax-Element-46-Frame">
         <span class="math" id="MathJax-Span-2254">
          <span class="mrow" id="MathJax-Span-2255">
           <span class="msubsup" id="MathJax-Span-2256">
            <span class="mi" id="MathJax-Span-2257">
             Y
            </span>
            <span class="mn" id="MathJax-Span-2258">
             1
            </span>
           </span>
          </span>
         </span>
        </span>
        垃圾邮件的概率大，但是因为
        <span class="MathJax" id="MathJax-Element-47-Frame">
         <span class="math" id="MathJax-Span-2259">
          <span class="mrow" id="MathJax-Span-2260">
           <span class="mi" id="MathJax-Span-2261">
            P
           </span>
           <span class="mo" id="MathJax-Span-2262">
            (
           </span>
           <span class="msubsup" id="MathJax-Span-2263">
            <span class="mi" id="MathJax-Span-2264">
             Y
            </span>
            <span class="mn" id="MathJax-Span-2265">
             1
            </span>
           </span>
           <span class="mo" id="MathJax-Span-2266">
            )
           </span>
          </span>
         </span>
        </span>
        特别小，用贝叶斯方法得出的结果是
        <span class="MathJax" id="MathJax-Element-48-Frame">
         <span class="math" id="MathJax-Span-2267">
          <span class="mrow" id="MathJax-Span-2268">
           <span class="msubsup" id="MathJax-Span-2269">
            <span class="mi" id="MathJax-Span-2270">
             Y
            </span>
            <span class="mn" id="MathJax-Span-2271">
             2
            </span>
           </span>
          </span>
         </span>
        </span>
        私人邮件的概率大。那相信哪个呢？其实，我们删掉了部分带标签的样本，从计算结果看
        <span class="MathJax" id="MathJax-Element-49-Frame">
         <span class="math" id="MathJax-Span-2272">
          <span class="mrow" id="MathJax-Span-2273">
           <span class="mi" id="MathJax-Span-2274">
            P
           </span>
           <span class="mo" id="MathJax-Span-2275">
            (
           </span>
           <span class="msubsup" id="MathJax-Span-2276">
            <span class="mi" id="MathJax-Span-2277">
             Y
            </span>
            <span class="mn" id="MathJax-Span-2278">
             1
            </span>
           </span>
           <span class="mo" id="MathJax-Span-2279">
            )
           </span>
           <span class="texatom" id="MathJax-Span-2280">
            <span class="mrow" id="MathJax-Span-2281">
             <span class="mo" id="MathJax-Span-2282">
              ，
             </span>
            </span>
           </span>
           <span class="mi" id="MathJax-Span-2283">
            P
           </span>
           <span class="mo" id="MathJax-Span-2284">
            (
           </span>
           <span class="msubsup" id="MathJax-Span-2285">
            <span class="mi" id="MathJax-Span-2286">
             Y
            </span>
            <span class="mn" id="MathJax-Span-2287">
             2
            </span>
           </span>
           <span class="mo" id="MathJax-Span-2288">
            )
           </span>
           <span class="texatom" id="MathJax-Span-2289">
            <span class="mrow" id="MathJax-Span-2290">
             <span class="mo" id="MathJax-Span-2291">
              ，
             </span>
            </span>
           </span>
           <span class="mi" id="MathJax-Span-2292">
            P
           </span>
           <span class="mo" id="MathJax-Span-2293">
            (
           </span>
           <span class="msubsup" id="MathJax-Span-2294">
            <span class="mi" id="MathJax-Span-2295">
             Y
            </span>
            <span class="mn" id="MathJax-Span-2296">
             3
            </span>
           </span>
           <span class="mo" id="MathJax-Span-2297">
            )
           </span>
          </span>
         </span>
        </span>
        的概率分布变化了，但实际上
        <strong>
         这三个类别的真实分布应该是一个客观的状态，不应该因为我们的计算方法而发生变化
        </strong>
        。所以是我们计算出来的先验概率失真，应该放弃这样计算出来的先验概率，而用最大似然法。但即便我们不删掉一半垃圾邮件，这三类邮件的分布就真的是1:1:1那样平均吗？那也未必。
        <strong>
         我们只是按1:1:1这样的方式进行了抽样而已，真正在邮箱里收到的这三类邮件的分布可能并不是这样
        </strong>
        。也就是说，
        <strong>
         在我们对于先验概率一无所知时，只能假设每种猜测的先验概率是均等的（其实这也是人类经验的结果），这个时候就只有用最大似然了
        </strong>
        。在现实运用过程中如果发现最大似然法有偏差，可以考虑对不同的似然函数设定一些系数或者阈值，使其接近真实情况。
       </p>
       <p>
        但是，
        <strong>
         如果我们有足够的自信，训练集中这三类的样本分布的确很接近真实的情况，这时就应该用贝叶斯方法
        </strong>
        。难怪前面的贝叶斯学派强调的是“靠谱的先验概率”。所以说
        <strong>
         贝叶斯学派的适用范围更广，关键要先验概率靠谱，而频率学派有效的前提也是他们的先验概率同样是经验统计的结果
        </strong>
        。
       </p>
       <h2 id="5-朴素贝叶斯方法的常见应用">
        <p name="t13">
        </p>
        5. (朴素)贝叶斯方法的常见应用
       </h2>
       <p>
        说了这么多理论的问题，咱们就可以探讨一下(朴素)贝叶斯方法在自然语言处理中的一些常见应用了。以下只是从原理上进行探讨，对于具体的技术细节顾及不多。
       </p>
       <h3 id="51-褒贬分析">
        <p name="t14">
        </p>
        5.1 褒贬分析
       </h3>
       <p>
        一个比较常见的应用场景是情感褒贬分析。比如你要统计微博上人们对一个新上映电影的褒贬程度评价：好片还是烂片。但是一条一条地看微博是根本看不过来，只能用自动化的方法。我们可以有一个很粗略的思路：
       </p>
       <ul>
        <li>
         首先是用爬虫将微博上提到这个电影名字的微博全都抓取下来，比如有10万条。
        </li>
        <li>
         然后用训练好的朴素贝叶斯分类器分别判断这些微博对电影是好评还是差评。
        </li>
        <li>
         最后统计出这些好评的影评占所有样本中的比例，就能形成微博网友对这个电影综合评价的大致估计。
        </li>
       </ul>
       <p>
        接下来的核心问题就是训练出一个靠谱的分类器。首先需要有打好标签的文本。这个好找，豆瓣影评上就有大量网友对之前电影的评价，并且对电影进行1星到5星的评价。我们可以认为3星以上的评论都是好评，3星以下的评论都是差评。这样就分别得到了好评差评两类的语料样本。剩下就可以用朴素贝叶斯方法进行训练了。基本思路如下：
       </p>
       <ul>
        <li>
         训练与测试样本：豆瓣影评的网友评论，用爬虫抓取下100万条。
        </li>
        <li>
         标签：3星以上的是好评，3星以下的是差评。
        </li>
        <li>
         特征：豆瓣评论分词后的词语。一个简单的方法是只选择其中的形容词，网上有大量的情绪词库可以为我们所用。
        </li>
        <li>
         然后再用常规的朴素贝叶斯方法进行训练。
        </li>
       </ul>
       <p>
        但是由于自然语言的特点，在提取特征的过程当中，有一些tricks需要注意：
       </p>
       <ul>
        <li>
         <strong>
          对否定句进行特别的处理
         </strong>
         。比如这句话“我不是很喜欢部电影，因为它让我开心不起来。”其中两个形容词“喜欢”、“开心”都是褒义词，但是因为句子的否定句，所以整体是贬义的。有一种比较简单粗暴的处理方式，就是
         <strong>
          “对否定词（“不”、“非”、“没”等）与句尾标点之间的所有形容词都采用其否定形式”
         </strong>
         。则这句话中提取出来的形容词就应该是“不喜欢”和“不开心”。
        </li>
        <li>
         一般说来，最相关的情感词在一些文本片段中仅仅出现一次，词频模型起得作用有限，甚至是负作用，
         <strong>
          则使用伯努利模型代替多项式模型
         </strong>
         。这种情况在微博这样的小篇幅文本中似乎不太明显，但是在博客、空间、论坛之类允许长篇幅文本出现的平台中需要注意。
        </li>
        <li>
         其实，副词对情感的评价有一定影响。“不很喜欢”与“很不喜欢”的程度就有很大差异。但如果是朴素贝叶斯方法的话比较难处理这样的情况。我们可以考虑用语言模型或者加入词性标注的信息进行综合判断。这些内容我们将在之后的文章进行探讨。
        </li>
       </ul>
       <p>
        当然经过以上的处理，情感分析还是会有一部分误判。这里涉及到许多问题，都是情感分析的难点：
       </p>
       <ul>
        <li>
         <strong>
          情绪表达的含蓄微妙
         </strong>
         ：“导演你出来，我保证不打死你。”你让机器怎么判断是褒还是贬？
        </li>
        <li>
         <strong>
          转折性表达
         </strong>
         ：“我非常喜欢这些大牌演员，非常崇拜这个导演，非常赞赏这个剧本，非常欣赏他们的预告片，我甚至为了这部影片整整期待了一年，最后进了电影院发现这是个噩梦。” 五个褒义的形容词、副词对一个不那么贬义的词。机器自然判断成褒义，但这句话是妥妥的贬义。
        </li>
       </ul>
       <h3 id="52-拼写纠错">
        <p name="t15">
        </p>
        5.2 拼写纠错
       </h3>
       <p>
        拼写纠错本质上也是一个分类问题。但按照错误类型不同，又分为两种情况：
       </p>
       <ul>
        <li>
         非词错误（Non-word Errors）：指那些拼写错误后的词本身就不合法，如将“wifi”写成“wify”；
        </li>
        <li>
         真词错误（Real-word Errors）：指那些拼写错误后的词仍然是合法的情况，如将“wifi”写成“wife”。
        </li>
       </ul>
       <p>
        真词错误复杂一些，我们将在接下来的文章中进行探讨。而对于非词错误，就可以直接采用贝叶斯方法，其基本思路如下：
       </p>
       <ul>
        <li>
         标签：通过计算错误词语的最小编辑距离（之前咱们提到过的），获取最相似的候选词，每个候选词作为一个分类。
        </li>
        <li>
         特征：拼写错误的词本身。因为它就一个特征，所以没有什么条件独立性假设、朴素贝叶斯啥的。它就是纯而又纯的贝叶斯方法。
        </li>
        <li>
         判别公式:
        </li>
       </ul>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-92-Frame">
          <span class="math" id="MathJax-Span-2298">
           <span class="mrow" id="MathJax-Span-2299">
            <span class="mi" id="MathJax-Span-2300">
             P
            </span>
            <span class="mo" id="MathJax-Span-2301">
             (
            </span>
            <span class="texatom" id="MathJax-Span-2302">
             <span class="mrow" id="MathJax-Span-2303">
              <span class="mo" id="MathJax-Span-2304">
               候
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2305">
             <span class="mrow" id="MathJax-Span-2306">
              <span class="mo" id="MathJax-Span-2307">
               选
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2308">
             <span class="mrow" id="MathJax-Span-2309">
              <span class="mo" id="MathJax-Span-2310">
               词
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2311">
             i
            </span>
            <span class="texatom" id="MathJax-Span-2312">
             <span class="mrow" id="MathJax-Span-2313">
              <span class="mo" id="MathJax-Span-2314">
               |
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2315">
             <span class="mrow" id="MathJax-Span-2316">
              <span class="mo" id="MathJax-Span-2317">
               错
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2318">
             <span class="mrow" id="MathJax-Span-2319">
              <span class="mo" id="MathJax-Span-2320">
               误
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2321">
             <span class="mrow" id="MathJax-Span-2322">
              <span class="mo" id="MathJax-Span-2323">
               词
              </span>
             </span>
            </span>
            <span class="mo" id="MathJax-Span-2324">
             )
            </span>
            <span class="mo" id="MathJax-Span-2325">
             ∝
            </span>
            <span class="mi" id="MathJax-Span-2326">
             P
            </span>
            <span class="mo" id="MathJax-Span-2327">
             (
            </span>
            <span class="texatom" id="MathJax-Span-2328">
             <span class="mrow" id="MathJax-Span-2329">
              <span class="mo" id="MathJax-Span-2330">
               错
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2331">
             <span class="mrow" id="MathJax-Span-2332">
              <span class="mo" id="MathJax-Span-2333">
               误
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2334">
             <span class="mrow" id="MathJax-Span-2335">
              <span class="mo" id="MathJax-Span-2336">
               词
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2337">
             <span class="mrow" id="MathJax-Span-2338">
              <span class="mo" id="MathJax-Span-2339">
               |
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2340">
             <span class="mrow" id="MathJax-Span-2341">
              <span class="mo" id="MathJax-Span-2342">
               候
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2343">
             <span class="mrow" id="MathJax-Span-2344">
              <span class="mo" id="MathJax-Span-2345">
               选
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2346">
             <span class="mrow" id="MathJax-Span-2347">
              <span class="mo" id="MathJax-Span-2348">
               词
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2349">
             i
            </span>
            <span class="mo" id="MathJax-Span-2350">
             )
            </span>
            <span class="mi" id="MathJax-Span-2351">
             P
            </span>
            <span class="mo" id="MathJax-Span-2352">
             (
            </span>
            <span class="texatom" id="MathJax-Span-2353">
             <span class="mrow" id="MathJax-Span-2354">
              <span class="mo" id="MathJax-Span-2355">
               候
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2356">
             <span class="mrow" id="MathJax-Span-2357">
              <span class="mo" id="MathJax-Span-2358">
               选
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2359">
             <span class="mrow" id="MathJax-Span-2360">
              <span class="mo" id="MathJax-Span-2361">
               词
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2362">
             i
            </span>
            <span class="mo" id="MathJax-Span-2363">
             )
            </span>
            <span class="texatom" id="MathJax-Span-2364">
             <span class="mrow" id="MathJax-Span-2365">
              <span class="mo" id="MathJax-Span-2366">
               ；
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2367">
             i
            </span>
            <span class="mo" id="MathJax-Span-2368">
             =
            </span>
            <span class="mn" id="MathJax-Span-2369">
             1
            </span>
            <span class="mo" id="MathJax-Span-2370">
             ,
            </span>
            <span class="mn" id="MathJax-Span-2371">
             2
            </span>
            <span class="mo" id="MathJax-Span-2372">
             ,
            </span>
            <span class="mn" id="MathJax-Span-2373">
             3
            </span>
            <span class="mo" id="MathJax-Span-2374">
             ,
            </span>
            <span class="mo" id="MathJax-Span-2375">
             .
            </span>
            <span class="mo" id="MathJax-Span-2376">
             .
            </span>
            <span class="mo" id="MathJax-Span-2377">
             .
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <ul>
        <li>
         训练样本1：该场景下的正常用词语料库，用于计算
         <span class="MathJax" id="MathJax-Element-93-Frame">
          <span class="math" id="MathJax-Span-2378">
           <span class="mrow" id="MathJax-Span-2379">
            <span class="mi" id="MathJax-Span-2380">
             P
            </span>
            <span class="mo" id="MathJax-Span-2381">
             (
            </span>
            <span class="texatom" id="MathJax-Span-2382">
             <span class="mrow" id="MathJax-Span-2383">
              <span class="mo" id="MathJax-Span-2384">
               候
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2385">
             <span class="mrow" id="MathJax-Span-2386">
              <span class="mo" id="MathJax-Span-2387">
               选
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2388">
             <span class="mrow" id="MathJax-Span-2389">
              <span class="mo" id="MathJax-Span-2390">
               词
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2391">
             i
            </span>
            <span class="mo" id="MathJax-Span-2392">
             )
            </span>
           </span>
          </span>
         </span>
         。
        </li>
       </ul>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-94-Frame">
          <span class="math" id="MathJax-Span-2393">
           <span class="mrow" id="MathJax-Span-2394">
            <span class="mi" id="MathJax-Span-2395">
             P
            </span>
            <span class="mo" id="MathJax-Span-2396">
             (
            </span>
            <span class="texatom" id="MathJax-Span-2397">
             <span class="mrow" id="MathJax-Span-2398">
              <span class="mo" id="MathJax-Span-2399">
               候
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2400">
             <span class="mrow" id="MathJax-Span-2401">
              <span class="mo" id="MathJax-Span-2402">
               选
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2403">
             <span class="mrow" id="MathJax-Span-2404">
              <span class="mo" id="MathJax-Span-2405">
               词
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2406">
             i
            </span>
            <span class="mo" id="MathJax-Span-2407">
             )
            </span>
            <span class="mo" id="MathJax-Span-2408">
             =
            </span>
            <span class="mfrac" id="MathJax-Span-2409">
             <span class="mrow" id="MathJax-Span-2410">
              <span class="texatom" id="MathJax-Span-2411">
               <span class="mrow" id="MathJax-Span-2412">
                <span class="mo" id="MathJax-Span-2413">
                 候
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2414">
               <span class="mrow" id="MathJax-Span-2415">
                <span class="mo" id="MathJax-Span-2416">
                 选
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2417">
               <span class="mrow" id="MathJax-Span-2418">
                <span class="mo" id="MathJax-Span-2419">
                 词
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2420">
               <span class="mrow" id="MathJax-Span-2421">
                <span class="mo" id="MathJax-Span-2422">
                 出
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2423">
               <span class="mrow" id="MathJax-Span-2424">
                <span class="mo" id="MathJax-Span-2425">
                 现
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2426">
               <span class="mrow" id="MathJax-Span-2427">
                <span class="mo" id="MathJax-Span-2428">
                 的
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2429">
               <span class="mrow" id="MathJax-Span-2430">
                <span class="mo" id="MathJax-Span-2431">
                 次
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2432">
               <span class="mrow" id="MathJax-Span-2433">
                <span class="mo" id="MathJax-Span-2434">
                 数
                </span>
               </span>
              </span>
             </span>
             <span class="mrow" id="MathJax-Span-2435">
              <span class="texatom" id="MathJax-Span-2436">
               <span class="mrow" id="MathJax-Span-2437">
                <span class="mo" id="MathJax-Span-2438">
                 所
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2439">
               <span class="mrow" id="MathJax-Span-2440">
                <span class="mo" id="MathJax-Span-2441">
                 有
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2442">
               <span class="mrow" id="MathJax-Span-2443">
                <span class="mo" id="MathJax-Span-2444">
                 词
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2445">
               <span class="mrow" id="MathJax-Span-2446">
                <span class="mo" id="MathJax-Span-2447">
                 出
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2448">
               <span class="mrow" id="MathJax-Span-2449">
                <span class="mo" id="MathJax-Span-2450">
                 现
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2451">
               <span class="mrow" id="MathJax-Span-2452">
                <span class="mo" id="MathJax-Span-2453">
                 的
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2454">
               <span class="mrow" id="MathJax-Span-2455">
                <span class="mo" id="MathJax-Span-2456">
                 次
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2457">
               <span class="mrow" id="MathJax-Span-2458">
                <span class="mo" id="MathJax-Span-2459">
                 数
                </span>
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <ul>
        <li>
         训练样本2：该场景下错误词与正确词对应关系的语料库，用于计算
         <span class="MathJax" id="MathJax-Element-95-Frame">
          <span class="math" id="MathJax-Span-2460">
           <span class="mrow" id="MathJax-Span-2461">
            <span class="mi" id="MathJax-Span-2462">
             P
            </span>
            <span class="mo" id="MathJax-Span-2463">
             (
            </span>
            <span class="texatom" id="MathJax-Span-2464">
             <span class="mrow" id="MathJax-Span-2465">
              <span class="mo" id="MathJax-Span-2466">
               错
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2467">
             <span class="mrow" id="MathJax-Span-2468">
              <span class="mo" id="MathJax-Span-2469">
               误
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2470">
             <span class="mrow" id="MathJax-Span-2471">
              <span class="mo" id="MathJax-Span-2472">
               词
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2473">
             <span class="mrow" id="MathJax-Span-2474">
              <span class="mo" id="MathJax-Span-2475">
               |
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2476">
             <span class="mrow" id="MathJax-Span-2477">
              <span class="mo" id="MathJax-Span-2478">
               候
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2479">
             <span class="mrow" id="MathJax-Span-2480">
              <span class="mo" id="MathJax-Span-2481">
               选
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2482">
             <span class="mrow" id="MathJax-Span-2483">
              <span class="mo" id="MathJax-Span-2484">
               词
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2485">
             i
            </span>
            <span class="mo" id="MathJax-Span-2486">
             )
            </span>
           </span>
          </span>
         </span>
        </li>
       </ul>
       <blockquote>
        <p>
         <span class="MathJax" id="MathJax-Element-96-Frame">
          <span class="math" id="MathJax-Span-2487">
           <span class="mrow" id="MathJax-Span-2488">
            <span class="mi" id="MathJax-Span-2489">
             P
            </span>
            <span class="mo" id="MathJax-Span-2490">
             (
            </span>
            <span class="texatom" id="MathJax-Span-2491">
             <span class="mrow" id="MathJax-Span-2492">
              <span class="mo" id="MathJax-Span-2493">
               错
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2494">
             <span class="mrow" id="MathJax-Span-2495">
              <span class="mo" id="MathJax-Span-2496">
               误
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2497">
             <span class="mrow" id="MathJax-Span-2498">
              <span class="mo" id="MathJax-Span-2499">
               词
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2500">
             <span class="mrow" id="MathJax-Span-2501">
              <span class="mo" id="MathJax-Span-2502">
               |
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2503">
             <span class="mrow" id="MathJax-Span-2504">
              <span class="mo" id="MathJax-Span-2505">
               候
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2506">
             <span class="mrow" id="MathJax-Span-2507">
              <span class="mo" id="MathJax-Span-2508">
               选
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2509">
             <span class="mrow" id="MathJax-Span-2510">
              <span class="mo" id="MathJax-Span-2511">
               词
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2512">
             i
            </span>
            <span class="mo" id="MathJax-Span-2513">
             )
            </span>
            <span class="mo" id="MathJax-Span-2514">
             =
            </span>
            <span class="mfrac" id="MathJax-Span-2515">
             <span class="mrow" id="MathJax-Span-2516">
              <span class="texatom" id="MathJax-Span-2517">
               <span class="mrow" id="MathJax-Span-2518">
                <span class="mo" id="MathJax-Span-2519">
                 候
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2520">
               <span class="mrow" id="MathJax-Span-2521">
                <span class="mo" id="MathJax-Span-2522">
                 选
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2523">
               <span class="mrow" id="MathJax-Span-2524">
                <span class="mo" id="MathJax-Span-2525">
                 词
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2526">
               <span class="mrow" id="MathJax-Span-2527">
                <span class="mo" id="MathJax-Span-2528">
                 被
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2529">
               <span class="mrow" id="MathJax-Span-2530">
                <span class="mo" id="MathJax-Span-2531">
                 拼
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2532">
               <span class="mrow" id="MathJax-Span-2533">
                <span class="mo" id="MathJax-Span-2534">
                 写
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2535">
               <span class="mrow" id="MathJax-Span-2536">
                <span class="mo" id="MathJax-Span-2537">
                 成
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2538">
               <span class="mrow" id="MathJax-Span-2539">
                <span class="mo" id="MathJax-Span-2540">
                 该
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-2541">
               “
              </span>
              <span class="texatom" id="MathJax-Span-2542">
               <span class="mrow" id="MathJax-Span-2543">
                <span class="mo" id="MathJax-Span-2544">
                 错
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2545">
               <span class="mrow" id="MathJax-Span-2546">
                <span class="mo" id="MathJax-Span-2547">
                 误
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2548">
               <span class="mrow" id="MathJax-Span-2549">
                <span class="mo" id="MathJax-Span-2550">
                 词
                </span>
               </span>
              </span>
              <span class="mo" id="MathJax-Span-2551">
               ”
              </span>
              <span class="texatom" id="MathJax-Span-2552">
               <span class="mrow" id="MathJax-Span-2553">
                <span class="mo" id="MathJax-Span-2554">
                 的
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2555">
               <span class="mrow" id="MathJax-Span-2556">
                <span class="mo" id="MathJax-Span-2557">
                 次
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2558">
               <span class="mrow" id="MathJax-Span-2559">
                <span class="mo" id="MathJax-Span-2560">
                 数
                </span>
               </span>
              </span>
             </span>
             <span class="mrow" id="MathJax-Span-2561">
              <span class="texatom" id="MathJax-Span-2562">
               <span class="mrow" id="MathJax-Span-2563">
                <span class="mo" id="MathJax-Span-2564">
                 候
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2565">
               <span class="mrow" id="MathJax-Span-2566">
                <span class="mo" id="MathJax-Span-2567">
                 选
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2568">
               <span class="mrow" id="MathJax-Span-2569">
                <span class="mo" id="MathJax-Span-2570">
                 词
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2571">
               <span class="mrow" id="MathJax-Span-2572">
                <span class="mo" id="MathJax-Span-2573">
                 出
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2574">
               <span class="mrow" id="MathJax-Span-2575">
                <span class="mo" id="MathJax-Span-2576">
                 现
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2577">
               <span class="mrow" id="MathJax-Span-2578">
                <span class="mo" id="MathJax-Span-2579">
                 的
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2580">
               <span class="mrow" id="MathJax-Span-2581">
                <span class="mo" id="MathJax-Span-2582">
                 次
                </span>
               </span>
              </span>
              <span class="texatom" id="MathJax-Span-2583">
               <span class="mrow" id="MathJax-Span-2584">
                <span class="mo" id="MathJax-Span-2585">
                 数
                </span>
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </p>
       </blockquote>
       <p>
        由于自然语言的特点，有一些tricks需要注意：
       </p>
       <ul>
        <li>
         据统计，80%的拼写错误编辑距离为1，几乎所有的拼写错误编辑距离小于等于2。我们
         <strong>
          只选择编辑距离为1或2的词作为候选词，这样就可以减少大量不必要的计算
         </strong>
         。
        </li>
        <li>
         由于我们只选择编辑距离为1或2的词，其差别只是一两个字母级别差别。因此计算似然函数的时候，
         <strong>
          可以只统计字母层面的编辑错误，这样搜集的样本更多，更满足大数定律，也更简单
         </strong>
         。对于编辑距离为1的似然函数计算公式可以进化为：
        </li>
       </ul>
       <blockquote>
        <div class="MathJax_Display">
         <span class="MathJax" id="MathJax-Element-97-Frame">
          <span class="math" id="MathJax-Span-2586">
           <span class="mrow" id="MathJax-Span-2587">
            <span class="mi" id="MathJax-Span-2588">
             P
            </span>
            <span class="mo" id="MathJax-Span-2589">
             (
            </span>
            <span class="texatom" id="MathJax-Span-2590">
             <span class="mrow" id="MathJax-Span-2591">
              <span class="mo" id="MathJax-Span-2592">
               错
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2593">
             <span class="mrow" id="MathJax-Span-2594">
              <span class="mo" id="MathJax-Span-2595">
               误
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2596">
             <span class="mrow" id="MathJax-Span-2597">
              <span class="mo" id="MathJax-Span-2598">
               词
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2599">
             <span class="mrow" id="MathJax-Span-2600">
              <span class="mo" id="MathJax-Span-2601">
               |
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2602">
             <span class="mrow" id="MathJax-Span-2603">
              <span class="mo" id="MathJax-Span-2604">
               候
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2605">
             <span class="mrow" id="MathJax-Span-2606">
              <span class="mo" id="MathJax-Span-2607">
               选
              </span>
             </span>
            </span>
            <span class="texatom" id="MathJax-Span-2608">
             <span class="mrow" id="MathJax-Span-2609">
              <span class="mo" id="MathJax-Span-2610">
               词
              </span>
             </span>
            </span>
            <span class="mi" id="MathJax-Span-2611">
             i
            </span>
            <span class="mo" id="MathJax-Span-2612">
             )
            </span>
            <span class="mo" id="MathJax-Span-2613">
             =
            </span>
            <span class="mrow" id="MathJax-Span-2614">
             <span class="mo" id="MathJax-Span-2615">
              ⎧⎩⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪
             </span>
             <span class="mtable" id="MathJax-Span-2616">
              <span class="mtd" id="MathJax-Span-2617">
               <span class="mrow" id="MathJax-Span-2618">
                <span class="mfrac" id="MathJax-Span-2619">
                 <span class="mrow" id="MathJax-Span-2620">
                  <span class="texatom" id="MathJax-Span-2621">
                   <span class="mrow" id="MathJax-Span-2622">
                    <span class="mo" id="MathJax-Span-2623">
                     字
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2624">
                   <span class="mrow" id="MathJax-Span-2625">
                    <span class="mo" id="MathJax-Span-2626">
                     母
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2627">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2628">
                   x
                  </span>
                  <span class="mi" id="MathJax-Span-2629">
                   y
                  </span>
                  <span class="mo" id="MathJax-Span-2630">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2631">
                   <span class="mrow" id="MathJax-Span-2632">
                    <span class="mo" id="MathJax-Span-2633">
                     被
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2634">
                   <span class="mrow" id="MathJax-Span-2635">
                    <span class="mo" id="MathJax-Span-2636">
                     拼
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2637">
                   <span class="mrow" id="MathJax-Span-2638">
                    <span class="mo" id="MathJax-Span-2639">
                     写
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2640">
                   <span class="mrow" id="MathJax-Span-2641">
                    <span class="mo" id="MathJax-Span-2642">
                     成
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2643">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2644">
                   y
                  </span>
                  <span class="mo" id="MathJax-Span-2645">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2646">
                   <span class="mrow" id="MathJax-Span-2647">
                    <span class="mo" id="MathJax-Span-2648">
                     的
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2649">
                   <span class="mrow" id="MathJax-Span-2650">
                    <span class="mo" id="MathJax-Span-2651">
                     次
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2652">
                   <span class="mrow" id="MathJax-Span-2653">
                    <span class="mo" id="MathJax-Span-2654">
                     数
                    </span>
                   </span>
                  </span>
                 </span>
                 <span class="mrow" id="MathJax-Span-2655">
                  <span class="texatom" id="MathJax-Span-2656">
                   <span class="mrow" id="MathJax-Span-2657">
                    <span class="mo" id="MathJax-Span-2658">
                     字
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2659">
                   <span class="mrow" id="MathJax-Span-2660">
                    <span class="mo" id="MathJax-Span-2661">
                     母
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2662">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2663">
                   x
                  </span>
                  <span class="mi" id="MathJax-Span-2664">
                   y
                  </span>
                  <span class="mo" id="MathJax-Span-2665">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2666">
                   <span class="mrow" id="MathJax-Span-2667">
                    <span class="mo" id="MathJax-Span-2668">
                     出
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2669">
                   <span class="mrow" id="MathJax-Span-2670">
                    <span class="mo" id="MathJax-Span-2671">
                     现
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2672">
                   <span class="mrow" id="MathJax-Span-2673">
                    <span class="mo" id="MathJax-Span-2674">
                     的
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2675">
                   <span class="mrow" id="MathJax-Span-2676">
                    <span class="mo" id="MathJax-Span-2677">
                     次
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2678">
                   <span class="mrow" id="MathJax-Span-2679">
                    <span class="mo" id="MathJax-Span-2680">
                     数
                    </span>
                   </span>
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-2681">
                 ,
                </span>
               </span>
              </span>
              <span class="mtd" id="MathJax-Span-2682">
               <span class="mrow" id="MathJax-Span-2683">
                <span class="mfrac" id="MathJax-Span-2684">
                 <span class="mrow" id="MathJax-Span-2685">
                  <span class="texatom" id="MathJax-Span-2686">
                   <span class="mrow" id="MathJax-Span-2687">
                    <span class="mo" id="MathJax-Span-2688">
                     字
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2689">
                   <span class="mrow" id="MathJax-Span-2690">
                    <span class="mo" id="MathJax-Span-2691">
                     母
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2692">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2693">
                   x
                  </span>
                  <span class="mo" id="MathJax-Span-2694">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2695">
                   <span class="mrow" id="MathJax-Span-2696">
                    <span class="mo" id="MathJax-Span-2697">
                     被
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2698">
                   <span class="mrow" id="MathJax-Span-2699">
                    <span class="mo" id="MathJax-Span-2700">
                     拼
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2701">
                   <span class="mrow" id="MathJax-Span-2702">
                    <span class="mo" id="MathJax-Span-2703">
                     写
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2704">
                   <span class="mrow" id="MathJax-Span-2705">
                    <span class="mo" id="MathJax-Span-2706">
                     成
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2707">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2708">
                   x
                  </span>
                  <span class="mi" id="MathJax-Span-2709">
                   y
                  </span>
                  <span class="mo" id="MathJax-Span-2710">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2711">
                   <span class="mrow" id="MathJax-Span-2712">
                    <span class="mo" id="MathJax-Span-2713">
                     的
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2714">
                   <span class="mrow" id="MathJax-Span-2715">
                    <span class="mo" id="MathJax-Span-2716">
                     次
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2717">
                   <span class="mrow" id="MathJax-Span-2718">
                    <span class="mo" id="MathJax-Span-2719">
                     数
                    </span>
                   </span>
                  </span>
                 </span>
                 <span class="mrow" id="MathJax-Span-2720">
                  <span class="texatom" id="MathJax-Span-2721">
                   <span class="mrow" id="MathJax-Span-2722">
                    <span class="mo" id="MathJax-Span-2723">
                     字
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2724">
                   <span class="mrow" id="MathJax-Span-2725">
                    <span class="mo" id="MathJax-Span-2726">
                     母
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2727">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2728">
                   x
                  </span>
                  <span class="mo" id="MathJax-Span-2729">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2730">
                   <span class="mrow" id="MathJax-Span-2731">
                    <span class="mo" id="MathJax-Span-2732">
                     出
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2733">
                   <span class="mrow" id="MathJax-Span-2734">
                    <span class="mo" id="MathJax-Span-2735">
                     现
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2736">
                   <span class="mrow" id="MathJax-Span-2737">
                    <span class="mo" id="MathJax-Span-2738">
                     的
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2739">
                   <span class="mrow" id="MathJax-Span-2740">
                    <span class="mo" id="MathJax-Span-2741">
                     次
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2742">
                   <span class="mrow" id="MathJax-Span-2743">
                    <span class="mo" id="MathJax-Span-2744">
                     数
                    </span>
                   </span>
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-2745">
                 ,
                </span>
               </span>
              </span>
              <span class="mtd" id="MathJax-Span-2746">
               <span class="mrow" id="MathJax-Span-2747">
                <span class="mfrac" id="MathJax-Span-2748">
                 <span class="mrow" id="MathJax-Span-2749">
                  <span class="texatom" id="MathJax-Span-2750">
                   <span class="mrow" id="MathJax-Span-2751">
                    <span class="mo" id="MathJax-Span-2752">
                     字
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2753">
                   <span class="mrow" id="MathJax-Span-2754">
                    <span class="mo" id="MathJax-Span-2755">
                     母
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2756">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2757">
                   x
                  </span>
                  <span class="mo" id="MathJax-Span-2758">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2759">
                   <span class="mrow" id="MathJax-Span-2760">
                    <span class="mo" id="MathJax-Span-2761">
                     被
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2762">
                   <span class="mrow" id="MathJax-Span-2763">
                    <span class="mo" id="MathJax-Span-2764">
                     拼
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2765">
                   <span class="mrow" id="MathJax-Span-2766">
                    <span class="mo" id="MathJax-Span-2767">
                     写
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2768">
                   <span class="mrow" id="MathJax-Span-2769">
                    <span class="mo" id="MathJax-Span-2770">
                     成
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2771">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2772">
                   y
                  </span>
                  <span class="mo" id="MathJax-Span-2773">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2774">
                   <span class="mrow" id="MathJax-Span-2775">
                    <span class="mo" id="MathJax-Span-2776">
                     的
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2777">
                   <span class="mrow" id="MathJax-Span-2778">
                    <span class="mo" id="MathJax-Span-2779">
                     次
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2780">
                   <span class="mrow" id="MathJax-Span-2781">
                    <span class="mo" id="MathJax-Span-2782">
                     数
                    </span>
                   </span>
                  </span>
                 </span>
                 <span class="mrow" id="MathJax-Span-2783">
                  <span class="texatom" id="MathJax-Span-2784">
                   <span class="mrow" id="MathJax-Span-2785">
                    <span class="mo" id="MathJax-Span-2786">
                     字
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2787">
                   <span class="mrow" id="MathJax-Span-2788">
                    <span class="mo" id="MathJax-Span-2789">
                     母
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2790">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2791">
                   x
                  </span>
                  <span class="mo" id="MathJax-Span-2792">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2793">
                   <span class="mrow" id="MathJax-Span-2794">
                    <span class="mo" id="MathJax-Span-2795">
                     出
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2796">
                   <span class="mrow" id="MathJax-Span-2797">
                    <span class="mo" id="MathJax-Span-2798">
                     现
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2799">
                   <span class="mrow" id="MathJax-Span-2800">
                    <span class="mo" id="MathJax-Span-2801">
                     的
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2802">
                   <span class="mrow" id="MathJax-Span-2803">
                    <span class="mo" id="MathJax-Span-2804">
                     次
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2805">
                   <span class="mrow" id="MathJax-Span-2806">
                    <span class="mo" id="MathJax-Span-2807">
                     数
                    </span>
                   </span>
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-2808">
                 ,
                </span>
               </span>
              </span>
              <span class="mtd" id="MathJax-Span-2809">
               <span class="mrow" id="MathJax-Span-2810">
                <span class="mfrac" id="MathJax-Span-2811">
                 <span class="mrow" id="MathJax-Span-2812">
                  <span class="texatom" id="MathJax-Span-2813">
                   <span class="mrow" id="MathJax-Span-2814">
                    <span class="mo" id="MathJax-Span-2815">
                     字
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2816">
                   <span class="mrow" id="MathJax-Span-2817">
                    <span class="mo" id="MathJax-Span-2818">
                     母
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2819">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2820">
                   x
                  </span>
                  <span class="mi" id="MathJax-Span-2821">
                   y
                  </span>
                  <span class="mo" id="MathJax-Span-2822">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2823">
                   <span class="mrow" id="MathJax-Span-2824">
                    <span class="mo" id="MathJax-Span-2825">
                     被
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2826">
                   <span class="mrow" id="MathJax-Span-2827">
                    <span class="mo" id="MathJax-Span-2828">
                     拼
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2829">
                   <span class="mrow" id="MathJax-Span-2830">
                    <span class="mo" id="MathJax-Span-2831">
                     写
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2832">
                   <span class="mrow" id="MathJax-Span-2833">
                    <span class="mo" id="MathJax-Span-2834">
                     成
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2835">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2836">
                   y
                  </span>
                  <span class="mi" id="MathJax-Span-2837">
                   x
                  </span>
                  <span class="texatom" id="MathJax-Span-2838">
                   <span class="mrow" id="MathJax-Span-2839">
                    <span class="mo" id="MathJax-Span-2840">
                     的
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2841">
                   <span class="mrow" id="MathJax-Span-2842">
                    <span class="mo" id="MathJax-Span-2843">
                     次
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2844">
                   <span class="mrow" id="MathJax-Span-2845">
                    <span class="mo" id="MathJax-Span-2846">
                     数
                    </span>
                   </span>
                  </span>
                 </span>
                 <span class="mrow" id="MathJax-Span-2847">
                  <span class="texatom" id="MathJax-Span-2848">
                   <span class="mrow" id="MathJax-Span-2849">
                    <span class="mo" id="MathJax-Span-2850">
                     字
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2851">
                   <span class="mrow" id="MathJax-Span-2852">
                    <span class="mo" id="MathJax-Span-2853">
                     母
                    </span>
                   </span>
                  </span>
                  <span class="mo" id="MathJax-Span-2854">
                   “
                  </span>
                  <span class="mi" id="MathJax-Span-2855">
                   x
                  </span>
                  <span class="mi" id="MathJax-Span-2856">
                   y
                  </span>
                  <span class="mo" id="MathJax-Span-2857">
                   ”
                  </span>
                  <span class="texatom" id="MathJax-Span-2858">
                   <span class="mrow" id="MathJax-Span-2859">
                    <span class="mo" id="MathJax-Span-2860">
                     出
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2861">
                   <span class="mrow" id="MathJax-Span-2862">
                    <span class="mo" id="MathJax-Span-2863">
                     现
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2864">
                   <span class="mrow" id="MathJax-Span-2865">
                    <span class="mo" id="MathJax-Span-2866">
                     的
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2867">
                   <span class="mrow" id="MathJax-Span-2868">
                    <span class="mo" id="MathJax-Span-2869">
                     次
                    </span>
                   </span>
                  </span>
                  <span class="texatom" id="MathJax-Span-2870">
                   <span class="mrow" id="MathJax-Span-2871">
                    <span class="mo" id="MathJax-Span-2872">
                     数
                    </span>
                   </span>
                  </span>
                 </span>
                </span>
                <span class="mo" id="MathJax-Span-2873">
                 ,
                </span>
               </span>
              </span>
             </span>
            </span>
           </span>
          </span>
         </span>
        </div>
       </blockquote>
       <ul>
        <li>
         <strong>
          键盘上临近的按键更容易拼写错误，据此可以对上面这个条件概率进行加权
         </strong>
         。
        </li>
       </ul>
       <p>
       </p>
       <center>
        <br/>
        <img src="http://7xnkcs.com1.z0.glb.clouddn.com/longxinchen_0203keyboard.jpg?imageView/2/w/350/q/100"/>
       </center>
       <p>
       </p>
       <h2 id="6-小结">
        <p name="t16">
        </p>
        6. 小结
       </h2>
       <p>
        从这两篇文章大家基本可以看出，工程应用不同于学术理论，有许多tricks需要考虑，而理论本质就是翻来倒去折腾贝叶斯公式，都快玩出花来了。但是如果只用朴素贝叶斯，很多情况还是无法应付，需要我们在贝叶斯公式上再折腾出一些花样。详细内容，请听下回分解。
       </p>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/24687.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/u16130037972892789947fm21gp0-300x157.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24687.html" rel="bookmark" title="从0开始学习 GitHub 系列之「Git 进阶」">
         从0开始学习 GitHub 系列之「Git 进阶」
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24672.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/201407171112-300x172.png"/>
        </a>
        <a class="link" href="http://dataunion.org/24672.html" rel="bookmark" title="为什么说Spark SQL远远超越了MPP SQL">
         为什么说Spark SQL远远超越了MPP SQL
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24632.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/173850pfbbjnqrdd2qggkd-244x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24632.html" rel="bookmark" title="大数据挖掘技术在企业创新中的应用">
         大数据挖掘技术在企业创新中的应用
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24543.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/1013-300x187.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24543.html" rel="bookmark" title="一文告诉你机器学习中进行模型评价、模型选择和算法选择的终极方法（PART I）">
         一文告诉你机器学习中进行模型评价、模型选择和算法选择的终极方法（PART I）
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <!-- If comments are open, but there are no comments. -->
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F24536.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/24536.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/24536.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>